@dualbox/editor 1.0.53 → 1.0.54
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.
|
@@ -42799,11 +42799,15 @@ class GraphModel {
|
|
|
42799
42799
|
return lodash.keys(this.data.root.interface);
|
|
42800
42800
|
}
|
|
42801
42801
|
|
|
42802
|
+
onChange(cb) {
|
|
42803
|
+
this.onChangeCb = cb;
|
|
42804
|
+
}
|
|
42805
|
+
|
|
42802
42806
|
// save changes into history
|
|
42803
42807
|
save() {
|
|
42804
42808
|
var diff = this.history.save();
|
|
42805
|
-
if (this.
|
|
42806
|
-
this.
|
|
42809
|
+
if (this.onChangeCb) {
|
|
42810
|
+
this.onChangeCb(diff);
|
|
42807
42811
|
}
|
|
42808
42812
|
}
|
|
42809
42813
|
|
package/js/src/m/GraphModel.js
CHANGED
|
@@ -197,11 +197,15 @@ class GraphModel {
|
|
|
197
197
|
return _.keys(this.data.root.interface);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
onChange(cb) {
|
|
201
|
+
this.onChangeCb = cb;
|
|
202
|
+
}
|
|
203
|
+
|
|
200
204
|
// save changes into history
|
|
201
205
|
save() {
|
|
202
206
|
var diff = this.history.save();
|
|
203
|
-
if (this.
|
|
204
|
-
this.
|
|
207
|
+
if (this.onChangeCb) {
|
|
208
|
+
this.onChangeCb(diff);
|
|
205
209
|
}
|
|
206
210
|
}
|
|
207
211
|
|