mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
SVG Importer: implement initial support for viewBox attributes.
This commit is contained in:
parent
24ecf7840e
commit
a1e38ee52e
1 changed files with 5 additions and 0 deletions
|
@ -430,6 +430,11 @@ new function() {
|
|||
// Use place if we're dealing with a symbol:
|
||||
item = definition.place ? definition.place() : definition.clone();
|
||||
break;
|
||||
// http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute
|
||||
case 'viewBox':
|
||||
var values = convertStringTo(value, 'array'),
|
||||
rectangle = Rectangle.create.apply(this, values);
|
||||
(item.getDefinition ? item.getDefinition() : item).setBounds(rectangle);
|
||||
default:
|
||||
// Not supported yet.
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue