From 88e80d512bdd125e6d604541c291f699bf5df564 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 8 Feb 2012 17:49:02 -0800 Subject: Correcting the PI lock for height which had a bug in the original pull request. Signed-off-by: Valerio Virgillito --- .../sections/position-and-size.reel/position-and-size.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'js/panels/properties') diff --git a/js/panels/properties/sections/position-and-size.reel/position-and-size.js b/js/panels/properties/sections/position-and-size.reel/position-and-size.js index e539257d..49117090 100644 --- a/js/panels/properties/sections/position-and-size.reel/position-and-size.js +++ b/js/panels/properties/sections/position-and-size.reel/position-and-size.js @@ -149,6 +149,7 @@ exports.PosSize = Montage.create(Component, { this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot]; if(this.bindButton.value) { + var newWidth = Math.round(this.aspectRatioHeight * this.heightControl.value); if(!isFinite(newWidth)) newWidth = this.heightControl.value; @@ -181,12 +182,10 @@ exports.PosSize = Montage.create(Component, { this.heightControl.value = newHeight; this.application.ninja.elementMediator.setProperty(items, "height", [newHeight + "px"] , "Change", "pi"); - } else { - - this.application.ninja.elementMediator.setProperty(items, "width", [this.widthControl.value + "px"] , "Change", "pi", prevPosition); - this.savedPosition = null; } + this.application.ninja.elementMediator.setProperty(items, "width", [this.widthControl.value + "px"] , "Change", "pi", prevPosition); + this.savedPosition = null; } -- cgit v1.2.3