Esanders has uploaded a new change for review.
https://gerrit.wikimedia.org/r/232743
Change subject: Only draw focus box around canvas, instead of full width
......................................................................
Only draw focus box around canvas, instead of full width
Change-Id: I93d063b48a511caa62792d9116e972c7c8f5c42c
---
M modules/VisualEditor/ve.ce.MWGraphNode.js
1 file changed, 13 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph
refs/changes/43/232743/1
diff --git a/modules/VisualEditor/ve.ce.MWGraphNode.js
b/modules/VisualEditor/ve.ce.MWGraphNode.js
index b8a73d2..657b610 100644
--- a/modules/VisualEditor/ve.ce.MWGraphNode.js
+++ b/modules/VisualEditor/ve.ce.MWGraphNode.js
@@ -102,12 +102,23 @@
// Clear element
this.$element.empty();
+ if ( this.live ) {
+ this.emit( 'teardown' );
+ }
+
this.constructor.static.vegaParseSpec( this.getModel().getSpec(),
this.$element[0] ).then(
- null,
+ function () {
+ node.$focusable = node.$element.find( 'canvas' );
+ },
function ( failMessageKey ) {
node.$element.text( ve.msg( failMessageKey ) );
+ node.$focusable = node.$element;
}
- );
+ ).always( function () {
+ if ( node.live ) {
+ node.emit( 'setup' );
+ }
+ } );
};
/* Registration */
--
To view, visit https://gerrit.wikimedia.org/r/232743
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I93d063b48a511caa62792d9116e972c7c8f5c42c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits