svgdotjs / svg.import.js

A plugin for importing raw SVG into the svg.js library
97 stars 44 forks source link

Parse error #4

Closed redon closed 11 years ago

redon commented 11 years ago

Hallo Thank you for the plugin!

Using closure-compiler on my script I get an error

ERROR - Parse error. missing name after . operator draw.import(rawSvg); ^

does work when I change import to importSVG in your file (svg.import.js)

seems that import is reserved

wout commented 11 years ago

That could be the case indeed, I should have known. This will be fixed soon.

wout commented 11 years ago

This has been fixed. The import() method has been renamed to svg():

var draw = SVG('canvas')
draw.svg('<svg><rect width="100" height="100" /></svg>')