-- 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: 7b9a8fd82953dff6cf8f9e9f7a847ca1e2df13fb: path_to: revision_to:
commit 7b9a8fd82953dff6cf8f9e9f7a847ca1e2df13fb Author: James Baicoianu <james_github@baicoianu.com> Date: Fri Oct 20 00:15:04 2017 -0700 Handle proxy object inheritance diff --git a/scripts/janusbase.js b/scripts/janusbase.js
--- a/scripts/janusbase.js +++ b/scripts/janusbase.js @@ -272,16 +272,29 @@ elation.require(['engine.things.generic', 'utils.template'], function() { if (classdef) { var propertydefs = {}, proxydefs = {}; - for (var k in classdef.class) { - var v = classdef.class[k]; - var proxytype = 'property'; - if (typeof v == 'function') { - proxytype = 'function'; - this._proxyobject[k] = elation.bind(this._proxyobject, v); - } else { - propertydefs[k] = {type: 'object', default: v }; + + var classdefs = [classdef.class]; + if (classdef.extendclass) { + //var proxyobj = elation.engine.things[classdef.extendclass].base.prototype.getProxyObject.call(this, elation.engine.things[classdef.extendclass].classdef); + var customelement = this.room.getCustomElement(classdef.extendclass); + //var extendclass = elation.engine.things[classdef.extendclass]; + if (customelement) { + classdefs.unshift(customelement.class); + } + } + for (var i = 0; i < classdefs.length; i++) { + var tclassdef = classdefs[i]; + for (var k in tclassdef) { + var v = tclassdef[k]; + var proxytype = 'property'; + if (typeof v == 'function') { + proxytype = 'function'; + this._proxyobject[k] = elation.bind(this._proxyobject, v); + } else { + propertydefs[k] = {type: 'object', default: v }; + } + proxydefs[k] = [proxytype, k]; } - proxydefs[k] = [proxytype, k]; } this.defineProperties(propertydefs); this._proxyobject._proxydefs = proxydefs;
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 16:14:10 2024