Commit 4715e826 authored by olau@iola.dk's avatar olau@iola.dk

Support for providing the drag cursor for the navigate plugin as an option...

Support for providing the drag cursor for the navigate plugin as an option (based on patch by Kelly T. Moore)


git-svn-id: https://flot.googlecode.com/svn/trunk@301 1e0a6537-2640-0410-bfb7-f154510ff394
parent dbc1270b
...@@ -80,8 +80,10 @@ Changes: ...@@ -80,8 +80,10 @@ Changes:
changes size, e.g. on window resizes (sponsored by Novus Partners). changes size, e.g. on window resizes (sponsored by Novus Partners).
- Support Infinity/-Infinity for plotting asymptotes by hacking it - Support Infinity/-Infinity for plotting asymptotes by hacking it
into +/-Number.MAX_VALUE (reported by rabaea.mircea). into +/-Number.MAX_VALUE (reported by rabaea.mircea).
- Support restricting navigate plugin to not pan/zoom an axis (based - Support for restricting navigate plugin to not pan/zoom an axis (based
on patch by kkaefer). on patch by kkaefer).
- Support for providing the drag cursor for the navigate plugin as an
option (based on patch by Kelly T. Moore).
- New hooks: drawSeries - New hooks: drawSeries
......
...@@ -17,6 +17,7 @@ Options: ...@@ -17,6 +17,7 @@ Options:
pan: { pan: {
interactive: false interactive: false
cursor: "move" // CSS mouse cursor value used when dragging, e.g. "pointer"
frameRate: 20 frameRate: 20
} }
...@@ -32,6 +33,9 @@ moving around; the same for zoom. ...@@ -32,6 +33,9 @@ moving around; the same for zoom.
"amount" specifies the default amount to zoom in (so 1.5 = 150%) "amount" specifies the default amount to zoom in (so 1.5 = 150%)
relative to the current viewport. relative to the current viewport.
"cursor" is a standard CSS mouse cursor string used for visual
feedback to the user when dragging.
"frameRate" specifies the maximum number of times per second the plot "frameRate" specifies the maximum number of times per second the plot
will update itself while the user is panning around on it (set to null will update itself while the user is panning around on it (set to null
to disable intermediate pans, the plot will then not update until the to disable intermediate pans, the plot will then not update until the
...@@ -116,6 +120,7 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L ...@@ -116,6 +120,7 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L
}, },
pan: { pan: {
interactive: false, interactive: false,
cursor: "move",
frameRate: 20 frameRate: 20
} }
}; };
...@@ -149,7 +154,7 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L ...@@ -149,7 +154,7 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L
if (e.which != 1) // only accept left-click if (e.which != 1) // only accept left-click
return false; return false;
eventHolderCursor = eventHolder.css('cursor'); eventHolderCursor = eventHolder.css('cursor');
eventHolder.css('cursor', 'move'); eventHolder.css('cursor', o.pan.cursor);
pageX = e.pageX; pageX = e.pageX;
pageY = e.pageY; pageY = e.pageY;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment