Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/77040
Change subject: ce.ProtectedNode: Use surface initialize event instead of
toolbarPosition
......................................................................
ce.ProtectedNode: Use surface initialize event instead of toolbarPosition
Follows-up 867ec44a9.
Because:
- #toolbarPosition is emited more than once (so this
should at least have been a once() bound, not a connect)
- It is emitted for more than 1 toolbar (includes context menu
toolbar)
- Semantically incorrect (we want to know when the surface changes
not the toolbar)
- We want to get rid of that event entirely and this is the last
use of it.
Change-Id: Ica5ed04052f48fe84607abab72bcf65f97d689ed
---
M modules/ve/ce/ve.ce.ProtectedNode.js
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/40/77040/1
diff --git a/modules/ve/ce/ve.ce.ProtectedNode.js
b/modules/ve/ce/ve.ce.ProtectedNode.js
index 329b5bf..3a12f53 100644
--- a/modules/ve/ce/ve.ce.ProtectedNode.js
+++ b/modules/ve/ce/ve.ce.ProtectedNode.js
@@ -79,7 +79,7 @@
this.getRoot().getSurface().getModel()
.connect( this, { 'change': 'onSurfaceModelChange' } );
this.getRoot().getSurface().getSurface()
- .connect( this, { 'toolbarPosition': 'positionPhantoms' } );
+ .connect( this, { 'position': 'positionPhantoms' } );
// Shields
this.$.add( this.$.find( '*' ) ).each( function () {
@@ -115,7 +115,7 @@
this.root.getSurface().getModel()
.disconnect( this, { 'change': 'onSurfaceModelChange' } );
this.getRoot().getSurface().getSurface()
- .disconnect( this, { 'toolbarPosition': 'positionPhantoms' } );
+ .disconnect( this, { 'position': 'positionPhantoms' } );
// Shields
this.$shields.remove();
--
To view, visit https://gerrit.wikimedia.org/r/77040
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica5ed04052f48fe84607abab72bcf65f97d689ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits