Open USCSolarCarStrategy opened 7 years ago
I added a horizontal and vertical zoom (or x and y zoom in other words) to the slider.
Next step is to be able to move the zoomed in area. Any tips or ideas on it, please comment on this issue.
so i'm not sure how you want to do the ui - whether you'd like to be able to pan by dragging on the graph area, or adding even more sliders around...but that's just about where to attach the listeners.
In terms of moving the graph, I guess, the graph object should keep track of its '(x and y) zoom' in terms of range, and then also something for (x and y) location. Whenever zoom or location is changed, it'll just update the xmin,xmax,ymin,ymax according that.
I also noticed when I was playing around with it that the zoom is a little laggy...probably because we shoved a lot of points into the graph...so it might be good to try to optimize it but let's save that for another day.
Please add a vertical bar for y zoom. i'll create another issue for panning
I think i created and pushed a slider at the bottom of the graph ui in simulations, but I was not able to do much after that.
We need to assign it a listener, and then have graph's view reflect on the values.