mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
parent
91a7448c07
commit
c04746aa00
2 changed files with 16 additions and 1 deletions
|
@ -182,7 +182,7 @@ new function() {
|
|||
definition = item._definition,
|
||||
node = getDefinition(definition, 'symbol'),
|
||||
definitionItem = definition._item,
|
||||
bounds = definitionItem.getBounds();
|
||||
bounds = definitionItem.getStrokeBounds();
|
||||
if (!node) {
|
||||
node = SvgElement.create('symbol', {
|
||||
viewBox: formatter.rectangle(bounds)
|
||||
|
|
|
@ -229,4 +229,19 @@ if (!isNodeContext) {
|
|||
tolerance: 1e-2
|
||||
});
|
||||
});
|
||||
|
||||
test('Export symbol with stroke', function(assert) {
|
||||
var item = new Path.Circle({
|
||||
center: [0, 0],
|
||||
radius: 50,
|
||||
strokeColor: 'blue',
|
||||
strokeWidth: 10
|
||||
});
|
||||
|
||||
var symbol = new Symbol(item);
|
||||
symbol.place([50, 50]);
|
||||
|
||||
var svg = project.exportSVG({ bounds: 'content', asString: true });
|
||||
compareSVG(assert.async(), svg, project.activeLayer);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue