Closed ejucovy closed 12 years ago
Hey I just saw this. I'll get it in there pretty soon.
I wonder why you wouldn't want to serialize invisible objects though. Wouldn't you want to keep them and record their opacity? Otherwise, they should be deleted.
Oh .. re: invisible objects, it's a long and ugly story. I didn't mean to include those in the pull request - just the extra types. I'm still a bit new to pull requests. :)
For the long and ugly story though .. my application, which uses g.raphael, uses invisible objects in the canvas as a hack to draw a graph with no data on it - I add a data layer which just determines the domain and range of the graph, and draw it with invisible points. I do that because the user then adds real data layers onto the graph, but I need the graph itself to always be painted, and I couldn't find a more reasonable way to do it with g.raphael.
I'm using raphael.serialize to let the user download a static image of the graph that is created on the client side. For some reason the svg->image conversion I'm doing on the server (using imagemagic convert
) is drawing the invisible nodes as slightly visible. So I just added those cases to make sure the invisible nodes - which are just a client-side hack anyway in my application - never make it to the server.
Hey,
I started using raphael.serialize the other day. Thanks for it, very useful.
I added nodes to the output - that case was not in the code.
-egj