Merge pull request #284 from nathan/zoomed-comment-dragging

Fixed comments being scaled incorrectly when picked up
This commit is contained in:
Nathan Dinsmore 2014-06-24 16:42:11 -04:00
commit 06cbd80a8c
2 changed files with 8 additions and 0 deletions

View file

@ -128,6 +128,10 @@ public class ScriptsPane extends ScrollFrameContents {
addFeedbackShape();
}
public function prepareToDragComment(c:ScratchComment):void {
c.scaleX = c.scaleY = scaleX;
}
public function draggingDone():void {
hideFeedbackShape();
possibleTargets = [];

View file

@ -416,6 +416,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) {