XObject.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 25 May 2010 11:33:58 +0000 (19:33 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 25 May 2010 11:33:58 +0000 (19:33 +0800)
XObject.js

index 3155dba..c2e27b8 100644 (file)
@@ -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) {