From 5b17414ef7e1dad00bcf50fefc187b33697ff839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Mon, 27 Nov 2023 10:47:28 +0100 Subject: [PATCH] tweaked "write" primitive for the stage --- HISTORY.md | 3 +++ snap.html | 2 +- src/objects.js | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 89a70276f1..0d8c60d1ae 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -15,6 +15,9 @@ * **Translation Updates:** * German +2023-11-27 +* objects: tweaked "write" primitive for the stage + 2023-11-24 * objects: optimized scanning variable memory for function dependencies - speeds up editing custom blocks in projects with large lists * lists: turned off experimental list indices wrapping by default, not sure whether this is a good idea after all diff --git a/snap.html b/snap.html index b784587745..bcc932d3db 100755 --- a/snap.html +++ b/snap.html @@ -18,7 +18,7 @@ - + diff --git a/src/objects.js b/src/objects.js index 9b1e9b7c15..8e43d4bf62 100644 --- a/src/objects.js +++ b/src/objects.js @@ -94,7 +94,7 @@ embedMetadataPNG, SnapExtensions, SnapSerializer, snapEquals*/ /*jshint esversion: 11*/ -modules.objects = '2023-November-24'; +modules.objects = '2023-November-27'; var SpriteMorph; var StageMorph; @@ -10167,7 +10167,7 @@ StageMorph.prototype.setColorDimension = function (idx, num) { // StageMorph writing on the trails canvas -StageMorph.prototype.write = function (text, size) { // +++ +StageMorph.prototype.write = function (text, size) { var fontSize = Math.max(3, +size || 1) * this.scale, textMorph, ctx, img; @@ -10205,7 +10205,7 @@ StageMorph.prototype.write = function (text, size) { // +++ ctx.drawImage( img, fontSize / 2, - Math.min(0, (this.height() - img.height)) + Math.min(0, (this.height() - img.height - fontSize / 2)) ); ctx.restore(); this.changed();