|
From: Ethan A M. <sf...@us...> - 2011-04-11 16:48:18
|
On Monday, April 11, 2011 12:09:19 am pl...@pi... wrote: > Anyway , thanks for the extra effort on SVG, especially the mouse > coords, that is one thing I wanted to work on but never had time. > > Does that give x1,x2,y1,y2 coords like the wxt terminal ? At present it is echoing x1 y1 directly to the current mouse position. You can see how it works at the demo page. For polar mode plots it instead echos the polar coordinates. I wasted a lot of time trying to make it write the coordinates to a separate optional HTML element as the canvas terminal does. In the end I concluded that there is no portable way to do this, if it is even possible at all. An alternative that I did not pursue would be to reserve space at the bottom of each SVG figure where mousing information is written, similar to what you get on the x11 or wxt displays. I don't actually like that as well as either of the other two approaches, but it should be possible. Someone with more SVG smarts than I could probably improve the appearance of the mouse readout in the current scheme. For instance, it can be hard to read the coordinates when they appear on top of a complicated plot or a filled area in a dark color. There must be some way to assign a background color to the bounding region of the text, but I didn't figure out how. Also it would be nice to allow a mouse click to leave the current coordinates printed on the figure, as the other mousing terminals do. I think I know how to do that, but I didn't work on it. Ethan > > regards, Peter. |