kopia lustrzana https://github.com/backface/turtlestitch
fixed capturing global settings for serializing scenes
rodzic
08a36ff94f
commit
a3d0d9100e
|
@ -34,6 +34,7 @@
|
|||
* objects, gui: rearranged internal order of categories
|
||||
* byob: rearranged internal order of categories
|
||||
* objects: fixed overlapping blocks bug in unified palette
|
||||
* store, gui: fixed capturing global settings for serializing scenes
|
||||
|
||||
### 2021-07-15
|
||||
* gui: made sprite-bar height independent of the number of categories
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<script src="src/maps.js?version=2021-06-15"></script>
|
||||
<script src="src/extensions.js?version=2021-07-09"></script>
|
||||
<script src="src/xml.js?version=2021-07-05"></script>
|
||||
<script src="src/store.js?version=2021-07-08"></script>
|
||||
<script src="src/store.js?version=2021-07-16"></script>
|
||||
<script src="src/locale.js?version=2021-07-12"></script>
|
||||
<script src="src/cloud.js?version=2021-02-04"></script>
|
||||
<script src="src/api.js?version=2021-07-05"></script>
|
||||
|
|
|
@ -2764,6 +2764,7 @@ IDE_Morph.prototype.flatDesign = function () {
|
|||
IDE_Morph.prototype.refreshIDE = function () {
|
||||
var projectData;
|
||||
|
||||
this.scene.captureGlobalSettings();
|
||||
if (Process.prototype.isCatchingErrors) {
|
||||
try {
|
||||
projectData = this.serializer.serialize(
|
||||
|
@ -2971,6 +2972,7 @@ IDE_Morph.prototype.backup = function (callback) {
|
|||
IDE_Morph.prototype.backupAndDo = function (callback) {
|
||||
// private
|
||||
var username = this.cloud.username;
|
||||
this.scene.captureGlobalSettings();
|
||||
try {
|
||||
localStorage['-snap-backup-'] = this.serializer.serialize(
|
||||
new Project(this.scenes, this.scene)
|
||||
|
@ -4909,6 +4911,7 @@ IDE_Morph.prototype.exportProject = function (name) {
|
|||
var menu, str;
|
||||
if (name) {
|
||||
name = this.setProjectName(name);
|
||||
this.scene.captureGlobalSettings();
|
||||
try {
|
||||
menu = this.showMessage('Exporting');
|
||||
str = this.serializer.serialize(
|
||||
|
@ -6253,6 +6256,7 @@ IDE_Morph.prototype.reflectLanguage = function (lang, callback, noSave) {
|
|||
urlBar = location.hash;
|
||||
SnapTranslator.language = lang;
|
||||
if (!this.loadNewProject) {
|
||||
this.scene.captureGlobalSettings();
|
||||
if (Process.prototype.isCatchingErrors) {
|
||||
try {
|
||||
projectData = this.serializer.serialize(
|
||||
|
@ -6365,6 +6369,7 @@ IDE_Morph.prototype.userSetBlocksScale = function () {
|
|||
|
||||
IDE_Morph.prototype.setBlocksScale = function (num) {
|
||||
var projectData;
|
||||
this.scene.captureGlobalSettings();
|
||||
if (Process.prototype.isCatchingErrors) {
|
||||
try {
|
||||
projectData = this.serializer.serialize(
|
||||
|
@ -6715,6 +6720,7 @@ IDE_Morph.prototype.buildProjectRequest = function () {
|
|||
body,
|
||||
xml;
|
||||
|
||||
this.scene.captureGlobalSettings();
|
||||
this.serializer.isCollectingMedia = true;
|
||||
xml = this.serializer.serialize(proj);
|
||||
body = {
|
||||
|
@ -6797,6 +6803,7 @@ IDE_Morph.prototype.saveProjectToCloud = function (name) {
|
|||
|
||||
IDE_Morph.prototype.exportProjectMedia = function (name) {
|
||||
var menu, media;
|
||||
this.scene.captureGlobalSettings();
|
||||
this.serializer.isCollectingMedia = true;
|
||||
if (name) {
|
||||
this.setProjectName(name);
|
||||
|
@ -6823,6 +6830,7 @@ IDE_Morph.prototype.exportProjectMedia = function (name) {
|
|||
|
||||
IDE_Morph.prototype.exportProjectNoMedia = function (name) {
|
||||
var menu, str;
|
||||
this.scene.captureGlobalSettings();
|
||||
this.serializer.isCollectingMedia = true;
|
||||
if (name) {
|
||||
name = this.setProjectName(name);
|
||||
|
@ -6855,6 +6863,7 @@ IDE_Morph.prototype.exportProjectNoMedia = function (name) {
|
|||
|
||||
IDE_Morph.prototype.exportProjectAsCloudData = function (name) {
|
||||
var menu, str, media, dta;
|
||||
this.scene.captureGlobalSettings();
|
||||
this.serializer.isCollectingMedia = true;
|
||||
if (name) {
|
||||
name = this.setProjectName(name);
|
||||
|
|
10
src/store.js
10
src/store.js
|
@ -63,7 +63,7 @@ Project*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.store = '2021-July-08';
|
||||
modules.store = '2021-July-16';
|
||||
|
||||
// XML_Serializer ///////////////////////////////////////////////////////
|
||||
/*
|
||||
|
@ -1661,8 +1661,7 @@ Project.prototype.toXML = function (serializer) {
|
|||
};
|
||||
|
||||
Scene.prototype.toXML = function (serializer) {
|
||||
var tmp = new Scene(),
|
||||
xml;
|
||||
var xml;
|
||||
|
||||
function code(key) {
|
||||
var str = '';
|
||||
|
@ -1680,8 +1679,6 @@ Scene.prototype.toXML = function (serializer) {
|
|||
return str;
|
||||
}
|
||||
|
||||
tmp.captureGlobalSettings();
|
||||
this.applyGlobalSettings();
|
||||
xml = serializer.format(
|
||||
'<scene name="@"%>' +
|
||||
'<notes>$</notes>' +
|
||||
|
@ -1696,7 +1693,7 @@ Scene.prototype.toXML = function (serializer) {
|
|||
'', // unified palette persistence commented out during development
|
||||
// this.unifiedPalette ? ' palette="single"' : '',
|
||||
this.notes || '',
|
||||
Object.keys(StageMorph.prototype.hiddenPrimitives).reduce(
|
||||
Object.keys(this.hiddenPrimitives).reduce(
|
||||
(a, b) => a + ' ' + b,
|
||||
''
|
||||
),
|
||||
|
@ -1706,7 +1703,6 @@ Scene.prototype.toXML = function (serializer) {
|
|||
serializer.store(this.globalVariables),
|
||||
serializer.store(this.stage)
|
||||
);
|
||||
tmp.applyGlobalSettings();
|
||||
return xml;
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue