Merge "Use a global resizing flag on the surface to hide phantoms"

This commit is contained in:
jenkins-bot 2013-12-03 03:22:56 +00:00 committed by Gerrit Code Review
commit b5f04fe9e0
3 changed files with 4 additions and 1 deletions

View file

@ -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();
}
};

View file

@ -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

View file

@ -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>' );