projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75ed2b7
)
XObject.js
author
Alan Knowles
<alan@wideboy.(none)>
Thu, 15 Apr 2010 13:37:38 +0000
(21:37 +0800)
committer
Alan Knowles
<alan@wideboy.(none)>
Thu, 15 Apr 2010 13:37:38 +0000
(21:37 +0800)
XObject.js
patch
|
blob
|
history
diff --git
a/XObject.js
b/XObject.js
index
2189cd7
..
b441603
100644
(file)
--- a/
XObject.js
+++ b/
XObject.js
@@
-127,8
+127,11
@@
XObject.prototype = {
* @arg cfg {Object} same as XObject constructor.
*/
addItem : function(o) {
- var item = new XObject(o);
- item.parent = this;
+
+
+
+ var item = o.constructor == XObject ? o : xnew XObject(o);
+ item.parent = this;
this.items.push(item);
if (item.pack===false) { // no