Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/268059

Change subject: ResizableNode: Remove assumption about 'width'/'height' 
attributes
......................................................................

ResizableNode: Remove assumption about 'width'/'height' attributes

This has been abstracted elsewhere to getDimensions. Rather than
working out if a dimension has changed, just always apply and let
the browser optimize no-ops.

Change-Id: I434fe49504de95524364884452c0ae3cf90920cf
---
M src/ce/ve.ce.ResizableNode.js
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/59/268059/1

diff --git a/src/ce/ve.ce.ResizableNode.js b/src/ce/ve.ce.ResizableNode.js
index 3e4632b..4fab483 100644
--- a/src/ce/ve.ce.ResizableNode.js
+++ b/src/ce/ve.ce.ResizableNode.js
@@ -364,10 +364,8 @@
  * @param {string} from Old value
  * @param {string} to New value
  */
-ve.ce.ResizableNode.prototype.onResizableAttributeChange = function ( key, 
from, to ) {
-       if ( key === 'width' || key === 'height' ) {
-               this.$resizable.css( key, to );
-       }
+ve.ce.ResizableNode.prototype.onResizableAttributeChange = function () {
+       this.$resizable.css( this.model.getCurrentDimensions() );
 };
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/268059
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I434fe49504de95524364884452c0ae3cf90920cf
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

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

Reply via email to