mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42:07 -05:00
Define Symbol#clone(), needs testing.
This commit is contained in:
parent
5713bc07f2
commit
ec0484e798
1 changed files with 4 additions and 5 deletions
|
@ -24,10 +24,11 @@ var Symbol = this.Symbol = Base.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
clone: function() {
|
clone: function() {
|
||||||
// TODO: Implement!
|
return new Symbol(this._definition.clone());
|
||||||
return this.base();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// TODO: remove()
|
||||||
|
|
||||||
getDefinition: function() {
|
getDefinition: function() {
|
||||||
return this._definition;
|
return this._definition;
|
||||||
},
|
},
|
||||||
|
@ -35,9 +36,7 @@ var Symbol = this.Symbol = Base.extend({
|
||||||
setDefinition: function(item) {
|
setDefinition: function(item) {
|
||||||
this._definition = item;
|
this._definition = item;
|
||||||
item._removeFromParent();
|
item._removeFromParent();
|
||||||
|
// Move position to 0, 0. TODO: Why?
|
||||||
item.setPosition(new Point());
|
item.setPosition(new Point());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO:
|
|
||||||
// remove()
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue