From 36894e20b087c1a5598fa9fb175223f43e291717 Mon Sep 17 00:00:00 2001 From: Nathan Dinsmore Date: Mon, 16 Jun 2014 11:52:49 -0400 Subject: [PATCH] Fixed resizing zoomed comments --- src/uiwidgets/ResizeableFrame.as | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uiwidgets/ResizeableFrame.as b/src/uiwidgets/ResizeableFrame.as index f5379c5..aafaba3 100644 --- a/src/uiwidgets/ResizeableFrame.as +++ b/src/uiwidgets/ResizeableFrame.as @@ -124,9 +124,9 @@ public class ResizeableFrame extends Sprite implements DragClient { public function dragEnd(evt:MouseEvent):void { } public function dragMove(evt:MouseEvent):void { - var topLeft:Point = this.localToGlobal(new Point(0, 0)); - var newW:int = Math.max(minWidth, evt.stageX + 3 - topLeft.x); - var newH:int = Math.max(minHeight, evt.stageY + 3 - topLeft.y); + var pt:Point = this.globalToLocal(new Point(evt.stageX, evt.stageY)); + var newW:int = Math.max(minWidth, pt.x + 3); + var newH:int = Math.max(minHeight, pt.y + 3); setWidthHeight(newW, newH); if (parent && ('fixLayout' in parent)) (parent as Object).fixLayout(); }