wgge 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,7 +51,13 @@ export default class ObjectModel extends ModelBase {
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
if (state.p) {
|
|
54
|
-
this.properties.forEach(
|
|
54
|
+
this.properties.forEach(
|
|
55
|
+
(name, property) => {
|
|
56
|
+
if (property.isPersistent) {
|
|
57
|
+
property.restoreState(state.p[name]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
);
|
|
55
61
|
}
|
|
56
62
|
if (state.i !== undefined) {
|
|
57
63
|
this.restoreStateInternal(state.i);
|
|
@@ -67,8 +73,15 @@ export default class ObjectModel extends ModelBase {
|
|
|
67
73
|
|
|
68
74
|
if (this.properties.count() > 0) {
|
|
69
75
|
const properties = {};
|
|
70
|
-
this.properties.forEach(
|
|
71
|
-
|
|
76
|
+
this.properties.forEach(
|
|
77
|
+
(name, propertyNode) => {
|
|
78
|
+
if (propertyNode.isPersistent) {
|
|
79
|
+
const s = propertyNode.getState();
|
|
80
|
+
if (s !== undefined) {
|
|
81
|
+
properties[name] = s;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
72
85
|
);
|
|
73
86
|
state.p = properties;
|
|
74
87
|
}
|
|
@@ -104,9 +104,7 @@ export default class AssetCache extends NodeWithEvents {
|
|
|
104
104
|
|
|
105
105
|
loaderFailed(loader, msg, onError) {
|
|
106
106
|
console.error(`Loading of asset '${loader.uri}' failed: ${msg}`);
|
|
107
|
-
|
|
108
107
|
if (onError) onError(msg);
|
|
109
|
-
|
|
110
108
|
this.loaders.remove(loader);
|
|
111
109
|
}
|
|
112
110
|
|
|
@@ -117,9 +115,7 @@ export default class AssetCache extends NodeWithEvents {
|
|
|
117
115
|
} else {
|
|
118
116
|
this.cache.add(loader.uri, resource);
|
|
119
117
|
}
|
|
120
|
-
|
|
121
118
|
if (onLoaded) onLoaded(resource);
|
|
122
|
-
|
|
123
119
|
this.loaders.remove(loader);
|
|
124
120
|
}
|
|
125
121
|
|