SVG Editing plugin or library

SVG Editing plugin or library

I have a need for a simple SVG editor or "editor framework" that we can use in a native mobile touchscreen app that uses Rhodes (Rails-like server in the app programmed in Ruby, WebView UI using jQuery Mobile).

We currently use a simple native signature-capture extension, that only allows very simple bitmap drawing with no edit. That extension is no longer available to us in the latest Rhodes, and anyway it's a bit too basic for our needs. So, we've temporarily replaced it with sketch.js http://intridea.github.io/sketch.js/ One attraction is that it's super-tiny and pretty easy to understand. (We fixed one bug and tossed out some code we didn't need and discovered it was needlessly redrawing like crazy - which - amazingly - didn't seem to have impacted performance...)

While this is simplistic and still just bitmap/canvas, it's way more functional than the signature-capture extension!

Now I'm looking  for a more complete, vector-based solution for the longer term. Besides making stand-alone drawings, we'd also like to use it for marking-up photographs (editor overlays the photo), and so SVG is a more attractive solution than canvas/bitmap.

It would be nice if it's a jQuery plugin or is compatible with jQuery. We'll be using it with jQuery Mobile, but I'm sure I can deal with any JQM-realted issues, so it does not have to be jQuery Mobile-specific.

svg-edit:


Is impressive, under current development (despite the code.google.com hosting! ;) ), but seems not very well adapted to touch, has way more features than we need, and comes with it's own GUI.

And there's part of the rub. I want more than a library, and less than a complete graphics editor. We want to be able to use our own minimal UI. (In the case of phones, just drop-down menus from a header bar., on pads a combination of a single-line palette and drop-down menus.)

I'd like it to take care of the necessary UI bits for manipulating objects - selection, drawing "handles" for sizing/rotation/drag, handling drag interactions, etc. But I don't want it to supply any kind of "tool palette" (or if it has one, it should be possible to disable), since we will supply that ourselves. I'd like it to have functions we can call to put to use particular typical drawing tools - freehand line, straight line, square, circle, polygon - and then it should take care of the touch interaction. Not much more than that is needed.

I'd like it to build on top of a well-supported, current SVG (and/or canvas) graphics library - e.g. GSAP, d3, Raphael, Snap.

I'm thinking Raphael is a bit long in the tooth and supports a bunch of browsers we don't have to support.

 I find Snap particular intriguing, as it seems purely SVG-oriented, it's newish, backed by Adobe. But haven't been able to find a single example of an interactive editor (other than very specialized ones - like for creating a particular type of diagram) implemented in it. I'm sure it has the capability, but not sure I want to put the effort into writing the editor from scratch!

Suggestions?