diff --git a/NEWS.txt b/NEWS.txt index 2332e0d..9283590 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -80,8 +80,10 @@ Changes: changes size, e.g. on window resizes (sponsored by Novus Partners). - Support Infinity/-Infinity for plotting asymptotes by hacking it 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). +- Support for providing the drag cursor for the navigate plugin as an + option (based on patch by Kelly T. Moore). - New hooks: drawSeries diff --git a/jquery.flot.navigate.js b/jquery.flot.navigate.js index 8ffd6bf..d32b366 100644 --- a/jquery.flot.navigate.js +++ b/jquery.flot.navigate.js @@ -17,6 +17,7 @@ Options: pan: { interactive: false + cursor: "move" // CSS mouse cursor value used when dragging, e.g. "pointer" frameRate: 20 } @@ -32,6 +33,9 @@ moving around; the same for zoom. "amount" specifies the default amount to zoom in (so 1.5 = 150%) 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 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 @@ -116,6 +120,7 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L }, pan: { interactive: false, + cursor: "move", frameRate: 20 } }; @@ -149,7 +154,7 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L if (e.which != 1) // only accept left-click return false; eventHolderCursor = eventHolder.css('cursor'); - eventHolder.css('cursor', 'move'); + eventHolder.css('cursor', o.pan.cursor); pageX = e.pageX; pageY = e.pageY; });