FEATURE: Use appEvents instead of jQuery for composer resizing progress (#12574)

Additionally, add a composer:resize-started event to complement composer:resize-ended.
This commit is contained in:
Kane York 2021-04-01 10:00:57 -07:00 committed by GitHub
parent 3db08c073b
commit 5d2cd15548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -112,6 +112,7 @@ export default Component.extend(KeyEnterEscape, {
const performDrag = (event) => {
$composer.trigger("div-resizing");
this.appEvents.trigger("composer:div-resizing");
$composer.addClass("clear-transitions");
const currentMousePos = mouseYPos(event);
let size = origComposerSize + (lastMousePos - currentMousePos);
@ -142,6 +143,7 @@ export default Component.extend(KeyEnterEscape, {
lastMousePos = mouseYPos(event);
$document.on(DRAG_EVENTS, throttledPerformDrag);
$document.on(END_EVENTS, endDrag);
this.appEvents.trigger("composer:resize-started");
});
if (iOSWithVisualViewport()) {