Manipulating graphics in Ember


#1

In the Ember app I am working on I want to implement this functionality:

The following image appears in the screen and the doctor marks the regions where the patient has injuries.

Htd93S

I think that the way to go is to implement a very simple SVG editor, since I only have to add simple markers to the image.

Should I use raster images? d3?

Any ideas are greatly appreciated.


#2

Hm, anything wrong with using <map>?


#3

Never thought about it. Interesting idea. I will make some experiments.

Thank you Ming!


#4

If the shapes are basic, you can use straightforward markup and css. If you need polylines, D3 isn’t hard to work with once you get past the learning hump.


#5

Seconding the vote for d3. The hump is real, but it’s a very versatile tool that plays well with Ember and seems well-suited for this application. In particular, d3-shape for the actual drawing and d3-selection for mouse & event handling.


#6

@Chris_Lincoln, @davelowensohn I have plans to do a deep dive into d3 in the future. I am working in a Hospital Information System and I think that I can use d3 in many scenarios.

I appreciate your comments.