mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Implement PointText#clone(), untested.
This commit is contained in:
parent
4ceaca00f4
commit
fd8ceb9641
1 changed files with 7 additions and 2 deletions
|
@ -26,8 +26,13 @@ var PointText = this.PointText = TextItem.extend({
|
|||
},
|
||||
|
||||
clone: function() {
|
||||
// TODO: Implement!
|
||||
return this.base();
|
||||
var copy = this.base();
|
||||
copy.content = this.content;
|
||||
// Change _point without causing notification
|
||||
copy._point.set(this._point.x, this._point.y, true);
|
||||
// Use Matrix#initialize to easily copy over values.
|
||||
copy.matrix.initialize(this.matrix);
|
||||
return copy;
|
||||
},
|
||||
|
||||
getPoint: function() {
|
||||
|
|
Loading…
Reference in a new issue