repo: janusweb action: commit revision: path_from: revision_from: 8c225f363e5ffb6dc32e0dbbe8115e971ef6649c: path_to: revision_to:
commit 8c225f363e5ffb6dc32e0dbbe8115e971ef6649c Author: James BaicoianuDate: Wed May 8 12:13:27 2019 -0700 Expose 'objectchange' event to scripts diff --git a/scripts/janusbase.js b/scripts/janusbase.js
--- a/scripts/janusbase.js
+++ b/scripts/janusbase.js
@@ -68,6 +68,7 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f
// FIXME - saving references to bound functions, for future use. This should happen deeper in the component framework
this.handleFrameUpdates = elation.bind(this, this.handleFrameUpdates);
this.created = false;
+ elation.events.add(this, 'thing_change', (ev) => this.dispatchEvent({type: 'objectchange'}));
}
this.createObject3D = function() {
if (this.object && this.object instanceof THREE.Object3D) {
-----END OF PAGE-----