From 15f262c5a6676ec3cceb393212cab0b630bfd6be Mon Sep 17 00:00:00 2001 From: Nathan Dinsmore Date: Tue, 17 Jun 2014 12:58:08 -0400 Subject: [PATCH] Fixed comments being scaled incorrectly when picked up --- src/uiwidgets/ScriptsPane.as | 4 ++++ src/util/GestureHandler.as | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/uiwidgets/ScriptsPane.as b/src/uiwidgets/ScriptsPane.as index c39b76f..089435a 100644 --- a/src/uiwidgets/ScriptsPane.as +++ b/src/uiwidgets/ScriptsPane.as @@ -127,6 +127,10 @@ public class ScriptsPane extends ScrollFrameContents { addFeedbackShape(); } + public function prepareToDragComment(c:ScratchComment):void { + c.scaleX = c.scaleY = scaleX; + } + public function draggingDone():void { hideFeedbackShape(); possibleTargets = []; diff --git a/src/util/GestureHandler.as b/src/util/GestureHandler.as index 63b606a..5ebeddf 100644 --- a/src/util/GestureHandler.as +++ b/src/util/GestureHandler.as @@ -415,6 +415,10 @@ public class GestureHandler { if (b.parent is Block) Block(b.parent).removeBlock(b); if (b.parent != null) b.parent.removeChild(b); app.scriptsPane.prepareToDrag(b); + } else if (obj is ScratchComment) { + var c:ScratchComment = ScratchComment(obj); + if (c.parent != null) c.parent.removeChild(c); + app.scriptsPane.prepareToDragComment(c); } else { var inStage:Boolean = (obj.parent == app.stagePane); if (obj.parent != null) {