From efad5af67f4c8f07d790c81f0cdc6010b2c7a76e Mon Sep 17 00:00:00 2001 From: jmoenig Date: Sat, 2 Nov 2019 18:28:30 +0100 Subject: [PATCH] fixed the initial scale of new clones when the stage has been resized --- HISTORY.md | 6 ++++-- snap.html | 2 +- src/objects.js | 10 ++++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 1545db69..2f5f7fd7 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -14,8 +14,9 @@ * calling an empty reporter-ring with no formal parameters passing a single argument treats it as the identity function of that argument * **Notable Changes:** * dropping a ring parameter inside a reporter-ring no longer replaces the ring -* **Notable Fixes:** -* **Translation Updates:** +* **Notable Fix:** + * fixed the initial scale of new clones when the stage has been resized +* **Translation Update:** * German ### 2019-11-02 @@ -26,6 +27,7 @@ * threads: calling an empty reporter-ring with no formal parameters passing a single argument treats it as the identity function of that argument * blocks: renamed default special HOF parameter "item" to "value" * updated German translation for "value" +* objects: fixed the initial scale of new clones when the stage has been resized * prepared release ### 2019-11-01 diff --git a/snap.html b/snap.html index 272045ea..91d27b5d 100755 --- a/snap.html +++ b/snap.html @@ -8,7 +8,7 @@ - + diff --git a/src/objects.js b/src/objects.js index bc49e569..3d469b33 100644 --- a/src/objects.js +++ b/src/objects.js @@ -82,9 +82,9 @@ VariableDialogMorph, HTMLCanvasElement, Context, List, RingMorph, VideoMotion, SpeechBubbleMorph, InputSlotMorph, isNil, FileReader, TableDialogMorph, BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, BooleanSlotMorph, localize, TableMorph, TableFrameMorph, normalizeCanvas, VectorPaintEditorMorph, -HandleMorph, AlignmentMorph, Process, XML_Element, WorldMap*/ +HandleMorph, AlignmentMorph, Process, XML_Element, WorldMap, copyCanvas*/ -modules.objects = '2019-October-30'; +modules.objects = '2019-November-02'; var SpriteMorph; var StageMorph; @@ -1722,8 +1722,10 @@ SpriteMorph.prototype.fullCopy = function (forClone) { cb, effect; // make sure the clone has its own canvas to recycle - c.image = null; - c.drawNew(); + // needs to be copied instead of redrawn, because at + // this time the clone is not yet onstage and therefore + // has no access to the stage's scale + c.image = copyCanvas(this.image); // un-share individual properties c.instances = [];