mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
Merge "Use a global resizing flag on the surface to hide phantoms"
This commit is contained in:
commit
b5f04fe9e0
|
@ -163,7 +163,7 @@ ve.ce.ProtectedNode.prototype.onPhantomMouseDown = function ( e ) {
|
|||
* @method
|
||||
*/
|
||||
ve.ce.ProtectedNode.prototype.onProtectedMouseEnter = function () {
|
||||
if ( !this.root.getSurface().dragging && !this.resizing ) {
|
||||
if ( !this.root.getSurface().dragging && !this.root.getSurface().resizing ) {
|
||||
this.createPhantoms();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -246,6 +246,7 @@ ve.ce.ResizableNode.prototype.onResizeHandlesCornerMouseDown = function ( e ) {
|
|||
|
||||
// Bind resize events
|
||||
this.resizing = true;
|
||||
this.root.getSurface().resizing = true;
|
||||
this.updateSizeLabel( this.resizeInfo );
|
||||
this.$( this.getElementDocument() ).on( {
|
||||
'mousemove.ve-ce-resizableNode': ve.bind( this.onDocumentMouseMove, this ),
|
||||
|
@ -409,6 +410,7 @@ ve.ce.ResizableNode.prototype.onDocumentMouseUp = function () {
|
|||
this.$resizeHandles.removeClass( 've-ce-resizableNode-handles-resizing' );
|
||||
this.$( this.getElementDocument() ).off( '.ve-ce-resizableNode' );
|
||||
this.resizing = false;
|
||||
this.root.getSurface().resizing = false;
|
||||
this.updateSizeLabel();
|
||||
|
||||
// Apply changes to the model
|
||||
|
|
|
@ -45,6 +45,7 @@ ve.ce.Surface = function VeCeSurface( model, surface, options ) {
|
|||
this.dragging = false;
|
||||
this.relocating = false;
|
||||
this.selecting = false;
|
||||
this.resizing = false;
|
||||
this.contentBranchNodeChanged = false;
|
||||
this.$phantoms = this.$( '<div>' );
|
||||
this.$highlights = this.$( '<div>' );
|
||||
|
|
Loading…
Reference in a new issue