From 806974142d44afdd23534bf2d18eff0a8e701e0c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 8 Jun 2012 16:59:59 -0700 Subject: rewrite: currentSelectedContainer -> domContainer Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito --- js/lib/NJUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/lib/NJUtils.js') diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index 0dec6345..b35e29bc 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js @@ -96,8 +96,8 @@ exports.NJUtils = Montage.create(Component, { var styles = {}; styles['position'] = pos ? pos: "absolute"; - styles['left'] = (Math.round(drawData.midPt[0] - 0.5 * width)) - this.application.ninja.currentSelectedContainer.offsetLeft + 'px'; - styles['top'] = (Math.round(drawData.midPt[1] - 0.5 * height)) - this.application.ninja.currentSelectedContainer.offsetTop + 'px'; + styles['left'] = (Math.round(drawData.midPt[0] - 0.5 * width)) - this.application.ninja.currentDocument.model.domContainer.offsetLeft + 'px'; + styles['top'] = (Math.round(drawData.midPt[1] - 0.5 * height)) - this.application.ninja.currentDocument.model.domContainer.offsetTop + 'px'; styles['width'] = width + 'px'; styles['height'] = height + 'px'; -- cgit v1.2.3