SVG Importer: implement initial support for viewBox attributes.

This commit is contained in:
Jonathan Puckey 2012-11-08 17:32:07 +01:00
parent 24ecf7840e
commit a1e38ee52e

View file

@ -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;