Further to the question here, I realized using li
won't work best for me & hence upon further research & following the example here, I've manged to implement a customized version of draggable div
.
In the example (quoted in the answer of the question mentioned above), moving the scroll bar of the chart doesn't move the chart. However, implementing the charting by making the div
that contains the chart draggable according to (link), trying to scroll the scroll bar movs the div
& with it the chart.
In (link), I've commented out the code inside the sortable function as I don't need it which makes it look as below
$(function () {
$(".grid").sortable({
/*tolerance: 'pointer',
revert: 'invalid',
placeholder: 'span2 well placeholder tile',
forceHelperSize: true*/
});
});
In addition, to make the chart not to move when scrolled, I tried adding the below code
$(function () {
$(".grid").sortable({
/*tolerance: 'pointer',
revert: 'invalid',
placeholder: 'span2 well placeholder tile',
forceHelperSize: true*/
cancel: ".amcharts-main-div"
});
});
$(". grid" ).disableSelection();
However, adding the "cancel" & disableSelection() makes the chart immovable.
This is tricky situation. Could I request some guidance on clubbing these two functionalities namely making the div draggable & also when the chart's scroll bar is moved the chart shouldn't move please?