|
From: Ethan A M. <sf...@us...> - 2011-10-20 00:35:56
|
On Wednesday, October 19, 2011 03:57:09 pm pl...@pi... wrote: > > Since I raised the topic , there are two things there the id and the > > title, name gets used for both. > > > > Clearly id cannot have spaces so attempting a name with a space throws > > an error, though > > " line 133: illegal javascript variable name" is a bit cryptic unless > > one is familiar with the mechanics of svg. Well, it really is the javascript that cares, not the svg. But feel free to suggest a more helpful error message. > > A title with underscores, though legible, is not too pretty. Would it be > > better to substitute spaces with underscores internally when composing > > the id and allow spaces in name, and hence the visible title? Sorry, I don't understand what you are suggesting there. What do you mean by the "visible" title? Visible to whom? Using what tool? > PS I've just noticed that even when I do specify a name , the svg title > still gets "plot_1" appended to the name I specified. > > Is this necessary in some way , or is it an oversight? It is absolutely necessary. That is how the document distinguishes which elements belong to plot 1, which to plot 2, and so on. That way it is possible to globally toggle properties of one plot without affecting the others. These, by the way, are multiple plots within the same graph. If there are multiple graphs in the document, then we have globally accessible handles for name1_plot_1 ... name1_plot_N name2_plot_1 ... name2_plot_M and so on. Note that someone requested a more complex namespace https://sourceforge.net/tracker/?func=detail&aid=3205221&group_id=2055&atid=352055 and Christoph Bersch put together a patch that may or may not satisfy the request. Neither Christoph nor I am sufficiently knowledgeable about svg to judge whether the request is reasonable and whether the patch implements it correctly. Please help us by adding your thoughts, if you can. Ethan |