Reduced dragging update data from float to int

MAX31855-EH
chrono 2013-12-07 11:37:59 +01:00
rodzic 76fe1c9c16
commit 659c56a41c
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -60,8 +60,9 @@
if (drag.item.series.xaxis == ax2)
ax = ax2;
var newx = ax.min + (pos.pageX-drag.gridOffset.left)/ax.scale;
var newy = ay.max - (pos.pageY-drag.gridOffset.top)/ay.scale;
// Bring down to int
var newx = Math.floor(ax.min + (pos.pageX-drag.gridOffset.left)/ax.scale);
var newy = Math.floor(ay.max - (pos.pageY-drag.gridOffset.top)/ay.scale);
series[sidx].data[didx] = [newx, newy];
plot.processData();