Pablo Angulo wrote: > Hello > Sometimes when writing an interactive plot with @interact I would like > to select a 2D point. I can put two input boxes, one for each > coordinate. When either coordinate is updated, it starts to recompute > the graph, while I'd prefer it to compute only when both coordinates are > changed. But that's a minor issue: what I'd really like is to click on > the graph to select the point. Is this in your wishlist too?
Some initial work has already been done towards this. See http://trac.sagemath.org/sage_trac/ticket/3866 Marshall Hampton had a student that was going to work more on this. Marshall, has there been progress? > I think it might conflict with how @interact works: first fill the > controls, then the function does whatever, it may be a graph or not, and > there's no feedback from the output of the function back into the > interact controls. > There might also be more than one point, so what to do with a click? I > have a suggestion: if an argument of the function is of type point > (instead of, say, input_box) then there are two boxes, one for each > coordinate, but also a draggable object, the size of a small circle. > I've seen drag and drop work using the scriptaculous javascrtipt > library, so it looks possible. When the object is dropped onto any > picture, it will trigger an update of the point coordinates. So there > would be several points, each with a different color, and the points > would be drawn on top of the graph with their respective colors on their > current positions so that the user knows what she's about to change. If > she drags the handle within the point box in the interact part, and drop > it in a position different than the current, the graph would be updated. > Any ideas? Is this feasible/desirable? I like your ideas! Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---