Clamp the minimum zoom level in the example

git-svn-id: https://flot.googlecode.com/svn/trunk@52 1e0a6537-2640-0410-bfb7-f154510ff394
pull/1/head
olau@iola.dk 18 years ago
parent 7a665a14f8
commit 1d8f4807b3

@ -66,6 +66,12 @@ $(function () {
var internalSelection = false;
$("#placeholder").bind("selected", function (event, area) {
// clamp the zooming to prevent eternal zoom
if (area.x2 - area.x1 < 0.00001)
area.x2 = area.x1 + 0.00001;
if (area.y2 - area.y1 < 0.00001)
area.y2 = area.y1 + 0.00001;
// do the zooming
plot = $.plot($("#placeholder"), getData(area.x1, area.x2),
$.extend(true, {}, options, {

Loading…
Cancel
Save