You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop events sometimes fire without preceding dragging, i.e. by a single click. This can be reproduced in the demo fiddle http://jsfiddle.net/highcharts/AyUbx/ like this:
Drag and drop the Jan value of series 3 to - say - 200.
Move the cursor to some location above the Feb columns, so that the Feb tooltip opens. The cursor does not need to switch to ns-resize.
Perform a single click.
As result, the #drop div displays something like "In Series 3, 1 was set to 71.50".
Although the Feb value does not change, this behavior is problematic if your drop callback performs something like changing the marker attributes.
As a workaround, one can define a drag event that sets a wasDragged flag, and have the drop event test that flag before performing the actual action:
events: {
drag: function () {
wasDragged = true;
},
drop: function() {
if ( wasDragged == true ) {
wasDragged = false;
// drop code goes here
};
}
}
The text was updated successfully, but these errors were encountered:
with draggable options activated on the x-axis of a series, a single click on a point generates a DROP events with a negative shift on the x-axis only when categorical values on x-axis
Drop events sometimes fire without preceding dragging, i.e. by a single click. This can be reproduced in the demo fiddle http://jsfiddle.net/highcharts/AyUbx/ like this:
As result, the #drop div displays something like "In Series 3, 1 was set to 71.50".
Although the Feb value does not change, this behavior is problematic if your drop callback performs something like changing the marker attributes.
As a workaround, one can define a drag event that sets a wasDragged flag, and have the drop event test that flag before performing the actual action:
events: {
drag: function () {
wasDragged = true;
},
drop: function() {
if ( wasDragged == true ) {
wasDragged = false;
// drop code goes here
};
}
}
The text was updated successfully, but these errors were encountered: