projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11e84e2
)
XObject.js
author
Alan Knowles
<alan@wideboy.(none)>
Thu, 15 Apr 2010 13:35:40 +0000
(21:35 +0800)
committer
Alan Knowles
<alan@wideboy.(none)>
Thu, 15 Apr 2010 13:35:40 +0000
(21:35 +0800)
XObject.js
patch
|
blob
|
history
diff --git
a/XObject.js
b/XObject.js
index
7d7706b
..
2189cd7
100644
(file)
--- a/
XObject.js
+++ b/
XObject.js
@@
-195,6
+195,7
@@
XObject.prototype = {
/**
* @method get
* Finds an object in the child elements using xid of object.
+ * prefix with '.' to look up the tree.. multiple '..' to look further up..
*
* @arg name {String} name of signal
* @return {XObject|false} the object if found.
@@
-202,6
+203,11
@@
XObject.prototype = {
get : function(xid)
{
var ret= false;
+ if (xid[0] == '.') {
+ return this.parent.get(xid.substring(1));
+ }
+
+
this.items.forEach(function(ch) {
if (ch.xid == xid) {
ret = ch;