highcharts / draggable-points

MIT License
32 stars 34 forks source link

Error when draggable point is clicked #55

Open ghost opened 8 years ago

ghost commented 8 years ago

When the user clicks on a point that has been defined as draggable, the following error is produced: draggable-points.js:96 Uncaught TypeError: Cannot set property 'dragStart' of undefined

pawelfus commented 8 years ago

Demo for the issue: http://jsfiddle.net/highcharts/AyUbx/ (official one). Issue comes from this line. I think there should be else case to return an empty point, or simply define newPos = {} here.

ghost commented 8 years ago

Here's a patch that solves the issue by checking for the state of the point inside the event handlers (I had to zip it as github apparently doesn't support .patch extension). diff.zip

meng-du commented 8 years ago

I think this should have been fixed by PR #54 (merged)