Navigation plugin: unify panRange & zoomRange restriction handling #48

Open
wants to merge 12 commits into
from

Projects

None yet

3 participants

@risicle
risicle commented Jun 19, 2012

Hi,

This is supposed to supersede my pull requests 44 & 45, which I'll close.

I've merged those two branches into something that uses a single setMinMax method to sanitize & set the min/max of an axis.

I've also added a setRanges & getRanges set of methods I needed that are supposed to mirror the behaviour of setSelection et al in the selection plugin.

On top of that I've updated the included jquery.event.drag for better jquery 1.7 support and partial touch event support.

You probably won't want all these changes, so I'm afraid you might just have to do some cherrypicking of patches, as I've already got more than enough branches to worry about :)

risicle added some commits Jun 5, 2012
@risicle risicle navigate plugin: enforce any panRange restrictions of an axis when zo…
…oming out
3a5a6fc
@risicle risicle navigate plugin: cope better with potential complications when using …
…nonlinear transforms and restricting against panRanges when zooming out
c7b296a
@risicle risicle navigate plugin: don't just give up if new zoom is outside the zoomRa…
…nge - set to the minimum/maximum range where possible. not perfect, particularly with respect to the centering of these final partial zoom steps.
246ae20
@risicle risicle Merge branch 'navzoompartial'
Conflicts:
	jquery.flot.navigate.js
994ed57
@risicle risicle navigate plugin: unify restriction checking & sanitizing to a setMinM…
…ax function

called by both pan & zoom functions to check all restrictions are obeyed
1f61767
@risicle risicle navigate plugin: add setRanges & getRanges methods
intended to behave like other plugins (e.g. selection) that get & set
their bounds with range objects
130fb71
@risicle risicle navigate plugin: update jquery.event.drag for jquery1.7 & partial tou…
…ch support
d39d5d7
@dnschnur dnschnur was assigned Jun 20, 2012
@risicle risicle navigate plugin: call triggerRedrawOverlay on bounds changes
I suspect most overlay content is position-related to the underlying
plot, so we'll want to redraw the overlay in the correct position
after changing the bounds. "live panning" can look a bit juddery at
the moment due to the different delay/draw coalescing behaviour of
plot & overlay
e4fe3bd
@dnschnur
Member

Thanks for submitting this! I've run into the same problem myself; just didn't have time to fix it. I'm almost through the pull request backlog, so I'll be reaching yours shortly.

@risicle
risicle commented Jun 23, 2012

I'm using this (along with a couple of other plugins I haven't submitted requests for yet) to implement one of those pan 'n scan overview-style plots (whatever people call them).

As in http://humanleg.org.uk/code/tsbp/flot_ps_ss.png - the lower box can be dragged for panning and its edges can be dragged to move them.

This uses another plugin I wrote ("draggableselection") - though now I'm thinking maybe I shouldn't be sending pull requests till this stuff has got through the testing phase of my development cycle.

This was referenced Sep 28, 2012
@dnschnur
Member

Moving this to the 0.9 milestone; we'll focus on plugins, so this is a good fit.

@chaveiro

See #1431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment