From: Alan Knowles Date: Tue, 25 May 2010 11:33:58 +0000 (+0800) Subject: XObject.js X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=ff9d838c09a92d9f327d25893fec21278ee17c04 XObject.js --- diff --git a/XObject.js b/XObject.js index 3155dbad9..c2e27b8c0 100644 --- a/XObject.js +++ b/XObject.js @@ -353,8 +353,24 @@ XObject.prototype = { return this.parent.get(xid.substring(1)); } if (xid[0] == '/') { + if (typeof(XObject.cache[xid]) != 'undefined') { return XObject.cache[xid]; + } + if (xid.indexOf('.') > -1) { + var child = false; + + if (xid.indexOf('.') > -1) { + child = xid.split('.'); + var nxid = child.shift(); + + child = child.join('.'); + if (typeof(XObject.cache[nxid]) != 'undefined') { + return XObject.cache[nxid].get(child); + } + } + + } var e = this; while (e.parent) { @@ -381,8 +397,6 @@ XObject.prototype = { xid = child.shift(); child = child.join('.'); - - } if (xid == this.id) {