kopia lustrzana https://github.com/backface/turtlestitch
shadow special lists (costumes, sounds) when adding an element to them
rodzic
2ca491abfa
commit
387cdca5ab
|
@ -8,7 +8,7 @@
|
||||||
<script type="text/javascript" src="src/symbols.js?version=2020-05-28"></script>
|
<script type="text/javascript" src="src/symbols.js?version=2020-05-28"></script>
|
||||||
<script type="text/javascript" src="src/widgets.js?version=2020-05-06"></script>
|
<script type="text/javascript" src="src/widgets.js?version=2020-05-06"></script>
|
||||||
<script type="text/javascript" src="src/blocks.js?version=2020-06-04"></script>
|
<script type="text/javascript" src="src/blocks.js?version=2020-06-04"></script>
|
||||||
<script type="text/javascript" src="src/threads.js?version=2020-06-07"></script>
|
<script type="text/javascript" src="src/threads.js?version=2020-06-10"></script>
|
||||||
<script type="text/javascript" src="src/objects.js?version=2020-06-09"></script>
|
<script type="text/javascript" src="src/objects.js?version=2020-06-09"></script>
|
||||||
<script type="text/javascript" src="src/gui.js?version=2020-06-08"></script>
|
<script type="text/javascript" src="src/gui.js?version=2020-06-08"></script>
|
||||||
<script type="text/javascript" src="src/paint.js?version=2020-05-17"></script>
|
<script type="text/javascript" src="src/paint.js?version=2020-05-17"></script>
|
||||||
|
|
|
@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map,
|
||||||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
|
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
|
||||||
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
|
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
|
||||||
|
|
||||||
modules.threads = '2020-June-07';
|
modules.threads = '2020-June-10';
|
||||||
|
|
||||||
var ThreadManager;
|
var ThreadManager;
|
||||||
var Process;
|
var Process;
|
||||||
|
@ -1755,9 +1755,19 @@ Process.prototype.reportCDR = function (list) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Process.prototype.doAddToList = function (element, list) {
|
Process.prototype.doAddToList = function (element, list) {
|
||||||
|
var rcvr;
|
||||||
this.assertType(list, 'list');
|
this.assertType(list, 'list');
|
||||||
if (list.type) {
|
if (list.type) {
|
||||||
this.assertType(element, list.type);
|
this.assertType(element, list.type);
|
||||||
|
// check whether the list is an attribute that needs to be shadowed
|
||||||
|
rcvr = this.blockReceiver();
|
||||||
|
if (this.reportIsIdentical(list, rcvr.costumes)) {
|
||||||
|
rcvr.shadowAttribute('costumes');
|
||||||
|
list = rcvr.costumes;
|
||||||
|
} else if (this.reportIsIdentical(list, rcvr.sounds)) {
|
||||||
|
rcvr.shadowAttribute('sounds');
|
||||||
|
list = rcvr.sounds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
list.add(element);
|
list.add(element);
|
||||||
};
|
};
|
||||||
|
|
Ładowanie…
Reference in New Issue