Prebuilt module for commit 16a7baa967

This commit is contained in:
Paper.js Bot 2016-02-15 23:01:23 +00:00
parent aac4c2288f
commit 541f74fb6f
5 changed files with 27 additions and 39 deletions

View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Mon Feb 15 09:21:11 2016 +0100 * Date: Mon Feb 15 23:58:40 2016 +0100
* *
*** ***
* *
@ -13933,7 +13933,7 @@ new function() {
return item; return item;
} }
function importSVG(source, options) { function importSVG(source, options, owner) {
if (!source) if (!source)
return null; return null;
options = typeof options === 'function' ? { onLoad: options } options = typeof options === 'function' ? { onLoad: options }
@ -13951,6 +13951,9 @@ new function() {
} }
paper = scope; paper = scope;
item = importNode(node, options, true); item = importNode(node, options, true);
if (!options || options.insert !== false) {
owner._insertItem(undefined, item);
}
var onLoad = options.onLoad; var onLoad = options.onLoad;
if (onLoad) if (onLoad)
onLoad(item, svg); onLoad(item, svg);
@ -13997,21 +14000,14 @@ new function() {
Item.inject({ Item.inject({
importSVG: function(node, options) { importSVG: function(node, options) {
var res = importSVG(node, options); return importSVG(node, options, this);
if (!options || options.insert !== false)
this.addChild(res);
return res;
} }
}); });
Project.inject({ Project.inject({
importSVG: function(node, options) { importSVG: function(node, options) {
this.activate(); this.activate();
var res = importSVG(node, options); return importSVG(node, options, this);
if (!options || options.insert !== false) {
this.getActiveLayer().addChild(res);
}
return res;
} }
}); });
}; };

18
dist/paper-core.js vendored
View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Mon Feb 15 09:21:11 2016 +0100 * Date: Mon Feb 15 23:58:40 2016 +0100
* *
*** ***
* *
@ -13933,7 +13933,7 @@ new function() {
return item; return item;
} }
function importSVG(source, options) { function importSVG(source, options, owner) {
if (!source) if (!source)
return null; return null;
options = typeof options === 'function' ? { onLoad: options } options = typeof options === 'function' ? { onLoad: options }
@ -13951,6 +13951,9 @@ new function() {
} }
paper = scope; paper = scope;
item = importNode(node, options, true); item = importNode(node, options, true);
if (!options || options.insert !== false) {
owner._insertItem(undefined, item);
}
var onLoad = options.onLoad; var onLoad = options.onLoad;
if (onLoad) if (onLoad)
onLoad(item, svg); onLoad(item, svg);
@ -13997,21 +14000,14 @@ new function() {
Item.inject({ Item.inject({
importSVG: function(node, options) { importSVG: function(node, options) {
var res = importSVG(node, options); return importSVG(node, options, this);
if (!options || options.insert !== false)
this.addChild(res);
return res;
} }
}); });
Project.inject({ Project.inject({
importSVG: function(node, options) { importSVG: function(node, options) {
this.activate(); this.activate();
var res = importSVG(node, options); return importSVG(node, options, this);
if (!options || options.insert !== false) {
this.getActiveLayer().addChild(res);
}
return res;
} }
}); });
}; };

File diff suppressed because one or more lines are too long

18
dist/paper-full.js vendored
View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Mon Feb 15 09:21:11 2016 +0100 * Date: Mon Feb 15 23:58:40 2016 +0100
* *
*** ***
* *
@ -13933,7 +13933,7 @@ new function() {
return item; return item;
} }
function importSVG(source, options) { function importSVG(source, options, owner) {
if (!source) if (!source)
return null; return null;
options = typeof options === 'function' ? { onLoad: options } options = typeof options === 'function' ? { onLoad: options }
@ -13951,6 +13951,9 @@ new function() {
} }
paper = scope; paper = scope;
item = importNode(node, options, true); item = importNode(node, options, true);
if (!options || options.insert !== false) {
owner._insertItem(undefined, item);
}
var onLoad = options.onLoad; var onLoad = options.onLoad;
if (onLoad) if (onLoad)
onLoad(item, svg); onLoad(item, svg);
@ -13997,21 +14000,14 @@ new function() {
Item.inject({ Item.inject({
importSVG: function(node, options) { importSVG: function(node, options) {
var res = importSVG(node, options); return importSVG(node, options, this);
if (!options || options.insert !== false)
this.addChild(res);
return res;
} }
}); });
Project.inject({ Project.inject({
importSVG: function(node, options) { importSVG: function(node, options) {
this.activate(); this.activate();
var res = importSVG(node, options); return importSVG(node, options, this);
if (!options || options.insert !== false) {
this.getActiveLayer().addChild(res);
}
return res;
} }
}); });
}; };

File diff suppressed because one or more lines are too long