recycle cached Canvasses in table views

pull/89/head
jmoenig 2020-01-03 14:22:02 +01:00
rodzic 8e27643869
commit b72c4bce5f
3 zmienionych plików z 11 dodań i 9 usunięć

Wyświetl plik

@ -3,6 +3,7 @@
## in development:
* **New Features:**
* **Notable Changes:**
* optimized loading projects
* **Notable Fixes:**
* **Translation Updates:**
@ -15,6 +16,7 @@
* widgets: recycle cached Canvasses
* byob: recycle cached Canvasses
* symbols: recycle cached Canvasses
* symbols: recycle cached Canvasses
## 5.4.0:
* **New Features:**

Wyświetl plik

@ -13,7 +13,7 @@
<script type="text/javascript" src="src/paint.js?version=2019-06-27"></script>
<script type="text/javascript" src="src/lists.js?version=2019-12-08"></script>
<script type="text/javascript" src="src/byob.js?version=2020-01-03"></script>
<script type="text/javascript" src="src/tables.js?version=2019-06-27"></script>
<script type="text/javascript" src="src/tables.js?version=2020-01-03"></script>
<script type="text/javascript" src="src/symbols.js?version=2020-01-03"></script>
<script type="text/javascript" src="src/sketch.js?version=2019-10-09"></script>
<script type="text/javascript" src="src/video.js?version=2019-06-27"></script>

Wyświetl plik

@ -7,7 +7,7 @@
written by Jens Mönig
jens@moenig.org
Copyright (C) 2016 by Jens Mönig
Copyright (C) 2020 by Jens Mönig
This file is part of Snap!.
@ -64,13 +64,13 @@
// Global settings /////////////////////////////////////////////////////
/*global modules, Point, newCanvas, Morph, fontHeight, SliderMorph, List,
MorphicPreferences, FrameMorph, HandleMorph, DialogBoxMorph, isString,
SpriteMorph, Context, Costume, ArgMorph, BlockEditorMorph, SymbolMorph,
/*global modules, Point, newCanvas, Morph, fontHeight, SliderMorph, isString,
MorphicPreferences, FrameMorph, HandleMorph, DialogBoxMorph, StringMorph,
SpriteMorph, Context, Costume, ArgMorph, BlockEditorMorph, SymbolMorph, List,
SyntaxElementMorph, MenuMorph, SpriteBubbleMorph, SpeechBubbleMorph, Sound,
CellMorph, ListWatcherMorph, isNil, BoxMorph, Variable, isSnapObject*/
modules.tables = '2019-June-04';
modules.tables = '2020-January-03';
var Table;
var TableCellMorph;
@ -312,7 +312,7 @@ TableCellMorph.prototype.getData = function () {
};
TableCellMorph.prototype.drawNew = function () {
this.image = newCanvas(this.extent());
this.image = newCanvas(this.extent(), false, this.image);
this.drawData();
};
@ -634,7 +634,7 @@ TableMorph.prototype.updateScrollBars = function () {
TableMorph.prototype.drawNew = function () {
var context, w, i;
this.image = newCanvas(this.extent());
this.image = newCanvas(this.extent(), false, this.image);
context = this.image.getContext('2d');
context.fillStyle = 'rgb(220, 220, 220)';
BoxMorph.prototype.outlinePath.call(
@ -824,7 +824,7 @@ TableMorph.prototype.update = function () {
// TableMorph layout helpers (all private):
TableMorph.prototype.rowLabelsWidth = function () {
var ctx = newCanvas().getContext('2d');
var ctx = StringMorph.prototype.measureCtx;
ctx.font = 'italic ' + SyntaxElementMorph.prototype.fontSize +
'px Helvetica, Arial, sans-serif';
return Math.max(