From 77c6ab76ffe9fc380ed6fdb7b29ccd40acaee74d Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 12 Apr 2012 14:24:25 -0700 Subject: Fixing selection/tag layout drawing when canvas and image elements have borders. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 2 ++ js/helper-classes/3D/view-utils.js | 13 ------------- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'js') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 07017f09..157c54ec 100755 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -131,6 +131,8 @@ exports.PiData = Montage.create( Montage, { type : "hottext", id : "borderWidth", prop : "border-width", + defaultValue: 0, + valueMutator: parseFloat, label : "Border", min : 0, max : 100, diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index addabba5..1cd1c313 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js @@ -603,19 +603,6 @@ exports.ViewUtils = Montage.create(Component, { w = elt.offsetWidth, h = elt.offsetHeight; - if(elt.width) - w = elt.width; - if(elt.height) - h = elt.height; - - if (elt.style) - { - if (elt.style.left) left = MathUtils.styleToNumber(elt.style.left); - if (elt.style.top) top = MathUtils.styleToNumber(elt.style.top); - if (elt.style.width) w = MathUtils.styleToNumber(elt.style.width); - if (elt.style.height) h = MathUtils.styleToNumber(elt.style.height); - } - // if (elt instanceof SVGSVGElement) { if(elt.nodeName.toLowerCase() === "svg") { if(w instanceof SVGAnimatedLength) -- cgit v1.2.3