Mercurial > MadButterfly
diff nodejs/svg.js @ 647:492da72e6537
Add image tag support.
author | wycc |
---|---|
date | Thu, 29 Jul 2010 00:15:19 +0800 |
parents | 3a1e80de44ff |
children | 3457519e3b9c |
line wrap: on
line diff
--- a/nodejs/svg.js Thu Jul 29 00:12:18 2010 +0800 +++ b/nodejs/svg.js Thu Jul 29 00:15:19 2010 +0800 @@ -207,10 +207,13 @@ if (ref == null) return; sys.puts(ref); - if (ref.substr(0,7) != "file://") { + if (ref.substr(0,7) == "file://") { + ref = ref.substring(7); + } else if (ref.substr(0,5)=="file:") { + ref = ref.substring(5); + } else { return; } - ref = ref.substring(7); sys.puts("Load image "+ref); var w; var h;