Skip to content

Commit

Permalink
Merge pull request #532 from jpmorganchase/persist-plugin
Browse files Browse the repository at this point in the history
Added save() and restore() methods to plugin API
  • Loading branch information
texodus authored Apr 9, 2019
2 parents e81aa5f + 03234d5 commit 5f10888
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/perspective-viewer/src/js/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ class PerspectiveViewer extends ActionElement {
obj[attr.name] = attr.value;
}
}
if (this._plugin.save) {
obj.plugin_config = this._plugin.save();
}
return obj;
}

Expand All @@ -502,6 +505,9 @@ class PerspectiveViewer extends ActionElement {
}
this.setAttribute(key, val);
}
if (this._plugin.restore && x.plugin_config) {
this._plugin.restore(x.plugin_config);
}
await this._debounce_update();
}

Expand Down

0 comments on commit 5f10888

Please sign in to comment.