Mooeypoo has uploaded a new change for review.
https://gerrit.wikimedia.org/r/93628
Change subject: Fix image resize handles update on surface change
......................................................................
Fix image resize handles update on surface change
The resizing handles under ResizableNode are created in the location of the
image
but if the page is edited and the image moves relative to the document, the
handles
remained where the image was previously and not where its updated location is
at.
This code fixes that bug by changing the CE event listening to the model's
'transact'
instead of 'history'.
Change-Id: Id0e4296dd89b24839ba68a534ca77d73c23b7434
---
M modules/ve/ce/ve.ce.ResizableNode.js
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/28/93628/1
diff --git a/modules/ve/ce/ve.ce.ResizableNode.js
b/modules/ve/ce/ve.ce.ResizableNode.js
index 3009cbc..1fdf431 100644
--- a/modules/ve/ce/ve.ce.ResizableNode.js
+++ b/modules/ve/ce/ve.ce.ResizableNode.js
@@ -184,9 +184,9 @@
var surfaceModel = this.getRoot().getSurface().getModel();
if ( this.live ) {
- surfaceModel.connect( this, { 'history':
'setResizableHandlesSizeAndPosition' } );
+ surfaceModel.connect( this, { 'transact':
'setResizableHandlesSizeAndPosition' } );
} else {
- surfaceModel.disconnect( this, { 'history':
'setResizableHandlesSizeAndPosition' } );
+ surfaceModel.disconnect( this, { 'transact':
'setResizableHandlesSizeAndPosition' } );
this.onResizableBlur();
}
};
--
To view, visit https://gerrit.wikimedia.org/r/93628
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0e4296dd89b24839ba68a534ca77d73c23b7434
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits