mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Merge pull request #34 from adroitwhiz/skip-numeric-id-import
Don't set item names in SVG import
This commit is contained in:
commit
155b58fa25
2 changed files with 10 additions and 2 deletions
|
@ -445,8 +445,6 @@ new function() {
|
|||
}, {}), {
|
||||
id: function(item, value) {
|
||||
definitions[value] = item;
|
||||
if (item.setName)
|
||||
item.setName(value);
|
||||
},
|
||||
|
||||
'clip-path': function(item, value) {
|
||||
|
|
|
@ -168,6 +168,16 @@ test('Import SVG string with leading line-breaks', function() {
|
|||
}));
|
||||
});
|
||||
|
||||
test('Import SVG with numeric ID', function() {
|
||||
paper.project.importSVG(createSVG('circle', {
|
||||
cx: 100,
|
||||
cy: 100,
|
||||
r: 50,
|
||||
id: '1'
|
||||
}));
|
||||
ok(true, 'Imports SVG with a numeric element ID without throwing.');
|
||||
});
|
||||
|
||||
function importSVG(assert, url, message, options) {
|
||||
var done = assert.async();
|
||||
project.importSVG(url, {
|
||||
|
|
Loading…
Reference in a new issue