Storing SVG paths as javascript variables
I seem to be having a 开发者_Go百科bit of an issue storing an SVG path string in a simple javascript variable. This is a bit mystifying to me and I haven't been able to find anything that points to why this might be happening.
The path is stored in a single-line string, with double quotes on each end. That's the only thing in this file, yet when I try to utilize the string with Raphael.js I'm getting that exception error. Thoughts? Any help greatly appreciated.
It is not legal in JavaScript to spread a string across multiple lines like it appears to be in your screenshot. You might edit your code so that the string being assigned to greenland
is all on one line or put a backslash to escape the newline character at the end of each line in the string.
精彩评论