kopia lustrzana https://github.com/backface/turtlestitch
removed redundant properties "notes" and "thumbnail" from project
rodzic
5d58c1e20a
commit
2c07601354
|
@ -13,6 +13,7 @@
|
|||
* gui: disabled dragging the project scene icon
|
||||
* gui: made sure the project scene stays in place
|
||||
* gui: added exporting single scenes
|
||||
* scenes, store: removed redundant properties "notes" and "thumbnail" from project
|
||||
|
||||
### 2021-05-18
|
||||
* gui: fixed exporting media only for a single scene
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<script src="src/blocks.js?version=2021-04-12"></script>
|
||||
<script src="src/threads.js?version=2021-04-17"></script>
|
||||
<script src="src/objects.js?version=2021-04-23"></script>
|
||||
<script src="src/scenes.js?version=2021-04-23"></script>
|
||||
<script src="src/scenes.js?version=2021-05-19"></script>
|
||||
<script src="src/gui.js?version=2021-05-19"></script>
|
||||
<script src="src/paint.js?version=2021-03-17"></script>
|
||||
<script src="src/lists.js?version=2021-03-15"></script>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<script src="src/video.js?version=2019-06-27"></script>
|
||||
<script src="src/maps.js?version=2020-03-25"></script>
|
||||
<script src="src/xml.js?version=2020-04-27"></script>
|
||||
<script src="src/store.js?version=2021-04-23"></script>
|
||||
<script src="src/store.js?version=2021-05-19"></script>
|
||||
<script src="src/locale.js?version=2021-03-15"></script>
|
||||
<script src="src/cloud.js?version=2021-02-04"></script>
|
||||
<script src="src/api.js?version=2021-01-25"></script>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
/*global modules, VariableFrame, StageMorph, SpriteMorph, Process, List*/
|
||||
|
||||
modules.scenes = '2021-April-23';
|
||||
modules.scenes = '2021-May-19';
|
||||
|
||||
|
||||
// Projecct /////////////////////////////////////////////////////////
|
||||
|
@ -61,12 +61,15 @@ modules.scenes = '2021-April-23';
|
|||
// Project instance creation:
|
||||
|
||||
function Project(scenes, current) {
|
||||
this.name = 'Test';
|
||||
this.notes = 'some notes';
|
||||
this.thumbnail = null;
|
||||
var projectScene;
|
||||
|
||||
this.scenes = scenes || new List();
|
||||
this.currentScene = current;
|
||||
|
||||
// proxied for display
|
||||
projectScene = this.scenes.at(1);
|
||||
this.name = projectScene ? projectScene.name : null;
|
||||
|
||||
// for deserializing - do not persist
|
||||
this.sceneIdx = null;
|
||||
|
||||
|
|
15
src/store.js
15
src/store.js
|
@ -61,7 +61,7 @@ Project*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.store = '2021-April-23';
|
||||
modules.store = '2021-May-19';
|
||||
|
||||
|
||||
// XML_Serializer ///////////////////////////////////////////////////////
|
||||
|
@ -1642,26 +1642,13 @@ Array.prototype.toXML = function (serializer) {
|
|||
// Scenes & multi-scene projects
|
||||
|
||||
Project.prototype.toXML = function (serializer) {
|
||||
var thumbdata;
|
||||
|
||||
// thumb data catch cross-origin tainting exception when using SVG costumes
|
||||
try {
|
||||
thumbdata = this.thumbnail.toDataURL('image/png');
|
||||
} catch (error) {
|
||||
thumbdata = null;
|
||||
}
|
||||
|
||||
return serializer.format(
|
||||
'<project name="@" app="@" version="@">' +
|
||||
'<notes>$</notes>' +
|
||||
'<thumbnail>$</thumbnail>' +
|
||||
'<scenes select="@">%</scenes>' +
|
||||
'</project>',
|
||||
this.name || localize('Untitled'),
|
||||
serializer.app,
|
||||
serializer.version,
|
||||
this.notes || '',
|
||||
thumbdata,
|
||||
this.scenes.asArray().indexOf(
|
||||
this.currentScene) + 1,
|
||||
serializer.store(this.scenes.itemsArray())
|
||||
|
|
Ładowanie…
Reference in New Issue