|
|
@@ -41,11 +41,10 @@ export default class WidgetResize extends Plugin {
|
|
|
/**
|
|
|
* The currently visible resizer.
|
|
|
*
|
|
|
- * @protected
|
|
|
* @observable
|
|
|
- * @member {module:widget/widgetresize/resizer~Resizer|null} #_visibleResizer
|
|
|
+ * @member {module:widget/widgetresize/resizer~Resizer|null} #visibleResizer
|
|
|
*/
|
|
|
- this.set( '_visibleResizer', null );
|
|
|
+ this.set( 'visibleResizer', null );
|
|
|
|
|
|
/**
|
|
|
* References an active resizer.
|
|
|
@@ -82,8 +81,8 @@ export default class WidgetResize extends Plugin {
|
|
|
this._observer.listenTo( domDocument, 'mouseup', this._mouseUpListener.bind( this ) );
|
|
|
|
|
|
const redrawFocusedResizer = () => {
|
|
|
- if ( this._visibleResizer ) {
|
|
|
- this._visibleResizer.redraw();
|
|
|
+ if ( this.visibleResizer ) {
|
|
|
+ this.visibleResizer.redraw();
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -91,7 +90,7 @@ export default class WidgetResize extends Plugin {
|
|
|
|
|
|
// Redraws occurring upon a change of visible resizer must not be throttled, as it is crucial for the initial
|
|
|
// render. Without it the resizer frame would be misaligned with resizing host for a fraction of second.
|
|
|
- this.on( 'change:_visibleResizer', redrawFocusedResizer );
|
|
|
+ this.on( 'change:visibleResizer', redrawFocusedResizer );
|
|
|
|
|
|
// Redrawing on any change of the UI of the editor (including content changes).
|
|
|
this.editor.ui.on( 'update', redrawFocusedResizerThrottled );
|
|
|
@@ -104,7 +103,7 @@ export default class WidgetResize extends Plugin {
|
|
|
viewSelection.on( 'change', () => {
|
|
|
const selectedElement = viewSelection.getSelectedElement();
|
|
|
|
|
|
- this._visibleResizer = this._getResizerByViewElement( selectedElement ) || null;
|
|
|
+ this.visibleResizer = this._getResizerByViewElement( selectedElement ) || null;
|
|
|
} );
|
|
|
}
|
|
|
|