|
@@ -22,7 +22,6 @@ import CompositionObserver from './observer/compositionobserver';
|
|
|
import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';
|
|
import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';
|
|
|
import log from '@ckeditor/ckeditor5-utils/src/log';
|
|
import log from '@ckeditor/ckeditor5-utils/src/log';
|
|
|
import mix from '@ckeditor/ckeditor5-utils/src/mix';
|
|
import mix from '@ckeditor/ckeditor5-utils/src/mix';
|
|
|
-import throttle from '@ckeditor/ckeditor5-utils/src/lib/lodash/throttle';
|
|
|
|
|
import { scrollViewportToShowTarget } from '@ckeditor/ckeditor5-utils/src/dom/scroll';
|
|
import { scrollViewportToShowTarget } from '@ckeditor/ckeditor5-utils/src/dom/scroll';
|
|
|
import { injectUiElementHandling } from './uielement';
|
|
import { injectUiElementHandling } from './uielement';
|
|
|
import { injectQuirksHandling } from './filler';
|
|
import { injectQuirksHandling } from './filler';
|
|
@@ -135,14 +134,6 @@ export default class View {
|
|
|
*/
|
|
*/
|
|
|
this._writer = new Writer( this.document );
|
|
this._writer = new Writer( this.document );
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * Fires throttled {@link module:engine/view/document~Document#event:layoutChanged} event.
|
|
|
|
|
- *
|
|
|
|
|
- * @protected
|
|
|
|
|
- * @type {Function}
|
|
|
|
|
- */
|
|
|
|
|
- this._throttledLayoutChange = throttle( () => this.document.fire( 'layoutChanged' ), 200 );
|
|
|
|
|
-
|
|
|
|
|
// Add default observers.
|
|
// Add default observers.
|
|
|
this.addObserver( MutationObserver );
|
|
this.addObserver( MutationObserver );
|
|
|
this.addObserver( SelectionObserver );
|
|
this.addObserver( SelectionObserver );
|
|
@@ -160,7 +151,7 @@ export default class View {
|
|
|
this._render();
|
|
this._render();
|
|
|
|
|
|
|
|
// Informs that layout has changed after render.
|
|
// Informs that layout has changed after render.
|
|
|
- this._throttledLayoutChange();
|
|
|
|
|
|
|
+ this.document.fire( 'layoutChanged' );
|
|
|
} );
|
|
} );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -390,7 +381,6 @@ export default class View {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.stopListening();
|
|
this.stopListening();
|
|
|
- this._throttledLayoutChange.cancel();
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|