-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: janusweb action: commit revision: path_from: revision_from: 49ddea88ab75c6355e2e8b47d91d958a7e60fe46: path_to: revision_to:
commit 49ddea88ab75c6355e2e8b47d91d958a7e60fe46 Author: James Baicoianu <james_github@baicoianu.com> Date: Fri Jun 26 08:27:02 2020 -0700 Added .setRoom() and expose .room prooperty diff --git a/scripts/janusbase.js b/scripts/janusbase.js
--- a/scripts/janusbase.js +++ b/scripts/janusbase.js @@ -316,6 +316,7 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f this._proxyobject = new elation.proxy(this, { parent: ['accessor', 'parent.getProxyObject'], children: ['accessor', 'getChildProxies'], + room: ['property', 'room'], parts: ['property', 'jsparts'], js_id: ['property', 'js_id'], pos: ['property', 'position'], @@ -384,6 +385,7 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f ongazeactivate: ['callback', 'gazeactivate'], ongazeprogress: ['callback', 'gazeprogress'], + setRoom: ['function', 'setRoom'], createObject: ['function', 'createObject'], appendChild: ['function', 'appendChild'], removeChild: ['function', 'removeChild'], @@ -1070,5 +1072,21 @@ console.log('clone', props); } } } + this.setRoom = function(room, ischild) { + if (this.room !== room) { + if (!ischild) { + this.stop(); + } + this.room = room; + for (let k in this.children) { + if (this.children[k].setRoom) { + this.children[k].setRoom(room, true); + } + } + if (!ischild) { + this.start(); + } + } + } }, elation.engine.things.generic); });
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 14:56:15 2024