Zoom wont return to 100% #1002

Closed
decabs opened this Issue Mar 22, 2013 · 5 comments

Comments

Projects
None yet
2 participants

decabs commented Mar 22, 2013

#1 Load the series as in Zoom_100_percent.gif.
#2 Click and zoom once to Zoom_Max_after.gif

After #2 plot will not zoom back to 100%.

/* Javascript plotting library for jQuery, version 0.8.0-beta.

jquery.flot.navigate.js taken from current master - today 22 March 2013.
Zoom_Max_after
Zoom_100_percent

@ghost ghost assigned dnschnur Mar 22, 2013

Owner

dnschnur commented Mar 22, 2013

Thanks for reporting this; I'll take a look at it this weekend. There are a few other pan/zoom range issues and pull requests that perhaps relate to this, or should be addressed at the same time.

decabs commented Mar 22, 2013

Hi David

Many thanks for getting back to me.

I see the example zooms correctly, however mine sometimes even looses say a quarter of the x axis tick text on some zooms.

Havent altered any of the javascript in the zoom functionality , and once in in the canvas mouse wheel used to zoom.

Oh yes and latest mousewheel is in the project.

Regards

Derek

From: David Schnur [mailto:notifications@github.com]
Sent: 22 March 2013 13:28
To: flot/flot
Cc: decabs
Subject: Re: [flot] Zoom wont return to 100% (#1002)

Thanks for reporting this; I'll take a look at it this weekend. There are a few other pan/zoom range issues and pull requests that perhaps relate to this, or should be addressed at the same time.


Reply to this email directly or view it on GitHub #1002 (comment) .Image removed by sender.

decabs commented Mar 22, 2013

Hi David

Don’t put any effort into this, I believe I am onto the problem.

The zoom appear to work correctly – I will carry out further checks.

I think I initially set a graph domain which is larger than the max zoom on the domain (x axis). Then I start zooming in, then out, however the max zoom 100% is set to a smaller value in the zoom range than what I started.

This gives me the impression that the zoom out isn’t working, however it is.

Leave it with me to look further, I shall add images to the git “issue” describing the functionality if I’m correct, either way I shall let you know.

Regards

Derek

From: David Schnur [mailto:notifications@github.com]
Sent: 22 March 2013 13:28
To: flot/flot
Cc: decabs
Subject: Re: [flot] Zoom wont return to 100% (#1002)

Thanks for reporting this; I'll take a look at it this weekend. There are a few other pan/zoom range issues and pull requests that perhaps relate to this, or should be addressed at the same time.


Reply to this email directly or view it on GitHub #1002 (comment) .Image removed by sender.

decabs commented Mar 22, 2013

Right found it.
I initially present the user with a plot as in image #1, the domain (x axis) is Mar 6 20:10 to Mar 08 16:10 plus a few minutes.

Quick refresh for slow people such as myself, 1362614400000 (mS) counts equals Thu, 07 Mar 2013 00:00:00,
3600 = 60 minutes = 1 hour, simply multiply 3600 by 1000 to convert to milli seconds. Hence my domain min is 3600000.

Back to the graph.

Next I zoom in, I go all the way to the zoomRange min, mine are now set to zoomRange: [3600000, 275000000];
where the integer values correspond to Unix epoch counts in milliseconds. I hit the buffers at 1 hour, the zoom Range min value. See ZoomRange-min.gif, dont quite know why I get more than 1 hour at the moment.
ZoomRange-min

Next I zoom back as shown in Zoom_Max_after.gif. My zoomRange max was set to a smaller domain max than I started with, this fooled me into thinking the zoom didnt work properly.

I have now altered my code to ensure the zoomRange max relates to the domain I initially presented the user with, in this case 275000000.

Thank heavens it Friday.

@decabs decabs closed this Mar 22, 2013

Owner

dnschnur commented Mar 22, 2013

Thanks for investigating this :)

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