repo: janusweb action: commit revision: path_from: revision_from: 42e563ee219d23d8fe3911afdfdb7b0d7cb2d4fb: path_to: revision_to:
commit 42e563ee219d23d8fe3911afdfdb7b0d7cb2d4fb Author: James BaicoianuDate: Sun Oct 25 10:42:45 2020 -0700 Added room.contains(object) diff --git a/scripts/room.js b/scripts/room.js
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -2481,6 +2481,14 @@ console.log('dispatch to parent', event, this, event.target);
}
this.loaded = false;
}
+ this.contains = function(obj) {
+ let ptr = obj;
+ while (ptr.parent) {
+ if (ptr.parent == this) return true;
+ ptr = ptr.parent;
+ }
+ return false;
+ }
}, elation.engine.things.generic);
});
-----END OF PAGE-----