jenkins-bot has submitted this change and it was merged.

Change subject: VisualEditor: Only draw focus box around canvas, instead of 
full width
......................................................................


VisualEditor: Only draw focus box around canvas, instead of full width

Change-Id: I93d063b48a511caa62792d9116e972c7c8f5c42c
---
M modules/ve-graph/ve.ce.MWGraphNode.js
1 file changed, 13 insertions(+), 2 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-graph/ve.ce.MWGraphNode.js 
b/modules/ve-graph/ve.ce.MWGraphNode.js
index 5b38b14..a8e961d 100644
--- a/modules/ve-graph/ve.ce.MWGraphNode.js
+++ b/modules/ve-graph/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: merged
Gerrit-Change-Id: I93d063b48a511caa62792d9116e972c7c8f5c42c
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Ferdbold <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to