mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Introduce new Item#copyAttributes() & #copyContent(), and revamp #clone() handling.
This commit is contained in:
parent
463f50a0c1
commit
2fea40f86f
13 changed files with 119 additions and 113 deletions
|
@ -39,9 +39,10 @@ function compareItem(actual, expected, message, options, properties) {
|
|||
QUnit.notStrictEqual(actual.id, 'not ' + expected.id, message + '.id');
|
||||
QUnit.strictEqual(actual.constructor, expected.constructor,
|
||||
message + '.constructor');
|
||||
// When item was cloned and had a name, the name will be versioned
|
||||
equals(options && options.cloned && actual.name ? actual.name + ' 1'
|
||||
: actual.name, expected.name,
|
||||
equals(actual.name,
|
||||
// When item was cloned and had a name, the name will be versioned
|
||||
options && options.cloned && expected.name
|
||||
? expected.name + ' 1' : expected.name,
|
||||
message + '.name');
|
||||
compareProperties(actual, expected, ['children', 'bounds', 'position',
|
||||
'matrix', 'data', 'opacity', 'locked', 'visible', 'blendMode',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue