Open jgoncab-arte opened 4 months ago
Currently, there is no such direct option to control the dragging cursor. A workaround is to listen to the georoam
event and change the cursor of the painter element. Demo
myChart.on('georoam', () => {
myChart.getZr().painter.getViewportRoot().style.cursor = 'move';
});
I did something like that but I added a condition to prevent changing the cursor if the event is caused by zoom and listened to the 'mouseup' event to change the cursor again to normal. I works for now but I still think this is a good feature. One problem I have with this approach is that changing the cursor overrides the cursor set for the visualmap.
What problem does this feature solve?
In first place, other series are able to change the cursor but
series.map
does not have that option. Moreover, it is common that the cursor changes while dragging so there should be another option for those cases.What does the proposed API look like?
cursor
anddragCursor
should have the same possible values as the 'cursor' property of other series. Another properties could bezoomCursor
anddraggableCursor
because I could see that some places without anything drawn are not draggable.