@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.onChange) {
42806
- this.onChange(diff);
42809
+ if (this.onChangeCb) {
42810
+ this.onChangeCb(diff);
42807
42811
  }
42808
42812
  }
42809
42813
 
@@ -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.onChange) {
204
- this.onChange(diff);
207
+ if (this.onChangeCb) {
208
+ this.onChangeCb(diff);
205
209
  }
206
210
  }
207
211
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dualbox/editor",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "Editor of Dualbox apps",
5
5
  "browser": "js/dist/GraphEditor.js",
6
6
  "main": "js/dist/GraphEditor.js",