kopia lustrzana https://github.com/backface/turtlestitch
serialization support for helper block feature
rodzic
52ab29c261
commit
58cd75e7dc
|
@ -22,7 +22,7 @@
|
|||
<script src="src/maps.js?version=2021-06-15"></script>
|
||||
<script src="src/extensions.js?version=2021-07-05"></script>
|
||||
<script src="src/xml.js?version=2021-07-05"></script>
|
||||
<script src="src/store.js?version=2021-07-05"></script>
|
||||
<script src="src/store.js?version=2021-07-06"></script>
|
||||
<script src="src/locale.js?version=2021-07-05"></script>
|
||||
<script src="src/cloud.js?version=2021-02-04"></script>
|
||||
<script src="src/api.js?version=2021-07-05"></script>
|
||||
|
|
|
@ -63,7 +63,7 @@ Project*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.store = '2021-July-05';
|
||||
modules.store = '2021-July-06';
|
||||
|
||||
// XML_Serializer ///////////////////////////////////////////////////////
|
||||
/*
|
||||
|
@ -955,6 +955,7 @@ SnapSerializer.prototype.loadCustomBlocks = function (
|
|||
);
|
||||
definition.category = child.attributes.category || 'other';
|
||||
definition.type = child.attributes.type || 'command';
|
||||
definition.isHelper = (child.attributes.helper === 'true') || false;
|
||||
definition.isGlobal = (isGlobal === true);
|
||||
if (isDispatch) {
|
||||
object.inheritedMethodsCache.push(definition);
|
||||
|
@ -2093,7 +2094,7 @@ CustomBlockDefinition.prototype.toXML = function (serializer) {
|
|||
}
|
||||
|
||||
return serializer.format(
|
||||
'<block-definition s="@" type="@" category="@">' +
|
||||
'<block-definition s="@" type="@" category="@"%>' +
|
||||
'%' +
|
||||
(this.variableNames.length ? '<variables>%</variables>' : '@') +
|
||||
'<header>@</header>' +
|
||||
|
@ -2104,6 +2105,7 @@ CustomBlockDefinition.prototype.toXML = function (serializer) {
|
|||
this.spec,
|
||||
this.type,
|
||||
this.category || 'other',
|
||||
this.isHelper ? ' helper="true"' : '',
|
||||
this.comment ? this.comment.toXML(serializer) : '',
|
||||
(this.variableNames.length ?
|
||||
serializer.store(new List(this.variableNames)) : ''),
|
||||
|
|
Ładowanie…
Reference in New Issue