Open mjy opened 12 years ago
Have you considered just doing the SVG editing inside the browser?
If all you need to do is create an annotation by selecting a color for it - then plotting some points -- I'm pretty sure it'd be straightforward to create the overlays in the browser.
What other things would you need to do ? Draw a line?
Looks like you need to support:
I can envision all of those but the 3d model.... I'm going to look around a bit.
Hehe- I almost added that we wouldn't be considering such for the existin task. We have indeed considered such, and in fact used a plugin to do so a while back. We spent a lot of time looking for other plugins that would give use the accuracy we needed, none really do, and the overhead to developing the code ourselves is not worth the power/flexibility we have in the existing approach, at least not at present. So- this is definitely not a priority now, down the road we might reconsider such, but it's very likely not going to happen for a long time.
Raphael.js -- we can export it to SVG with this plugin: https://github.com/jspies/raphael.serialize
Here is a simple JS library to draw things: https://gist.github.com/673186
I put this together just now which draws paths, circles, squares, and can export to a JSON blob, or SVG. I can think of adding annotations like text, little arrows, lines with notes, etc. etc. etc. All somewhat simple....
https://gist.github.com/2015072
I believe it is rough - but was pretty darned simple, and I think solves all the issues.
The only one I could come up with next was that you may want to zoom in on an image -- but that is sortof easily done anyway in JS -- but you may not need to.. might be able to just zoom with the browser?
Let me know... thanks. Cary
Ha. ok. sounds good.
We'll likely have to break this down to individual tasks, but I'll do my best to outline things here.
Background
We create SVG elements locally, then load them to mx, and overlay them on images. The general problem is one of dynamically rendering SVG elements on top of an image in the browser.
Model
Implementation Overview
Tasks