repo: janusweb
action: commit
revision: 
path_from: 
revision_from: bc3c541b508417583a06f6eaff50ce302ac4ff52:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit bc3c541b508417583a06f6eaff50ce302ac4ff52
Author: James Baicoianu 
Date:   Wed Nov 3 13:58:50 2021 -0700

    Track websurfaces in room.roomassets map so they show in source viewer

diff --git a/scripts/room.js b/scripts/room.js
index 77e1af263affeffc163ff8d2ce06db861217f278..
index ..523912da4ab8de28743d32c2607219180b291ab8 100644
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -727,6 +727,8 @@ elation.require([
         var assetlist = roomdata.assets.assetlist;
         if (roomdata.assets.websurfaces) {
           elation.utils.merge(roomdata.assets.websurfaces, this.websurfaces);
+          if (!this.roomassets.websurface) this.roomassets.websurface = {};
+          elation.utils.merge(roomdata.assets.websurfaces, this.roomassets.websurface);
         }

         if (roomdata.assets.ghosts) {
@@ -1466,6 +1468,8 @@ console.log('connect room audio to graph', this.audionodes.gain, this.audionodes
       } else if (type == 'websurface') {
         if (args.id) {
           this.websurfaces[args.id] = args;
+          if (!this.roomassets.websurface) this.roomassets.websurface = {};
+          this.roomassets.websurface[args.id] = args;
         }
       } else if (type == 'script') {
         var src = (args.src.match(/^file:/) ? args.src.replace(/^file:/, datapath) : args.src);

-----END OF PAGE-----