BALKANGraph / OrgChartJS

OrgChart JS is a simple, flexible and highly customizable organization chart plugin for presenting the structure of your organization and the relationships in an elegant way.
https://balkan.app/orgchartjs
252 stars 84 forks source link

"Double cursor" while panning #859

Open wcarson opened 1 month ago

wcarson commented 1 month ago

When moving/panning a chart, both the OS cursor and the chart cursor are visible. Is there any way to either hide the OS cursor when panning, or just use the OS cursor (e.g. styled with cursor: all-scroll)

CleanShot 2024-09-09 at 10 15 24@2x

ZornitsaPesheva commented 1 month ago

Do you reproduce the issue in this example?: https://code.balkan.app/org-chart-js/simple-example#CSS

wcarson commented 1 month ago

Yes. Both cursors are visible. CleanShot 2024-09-09 at 11 23 33@2x

ZornitsaPesheva commented 1 month ago

This is the pan animation. You can remove it this way: OrgChart.templates.ana.pointer = '';

wcarson commented 1 month ago

The template's pointer svg is providing the white pan/move pointer in my original screenshot above which is what I want. The issue is that the MacOS regular pointer is still visible.

If I remove the template's pointer svg, I'll be left with only the MacOS pointer. Is there a way to style the MacOS cursor while the chart is being panned? The other option would be to keep the template's svg and hide the OS pointer somehow when panning the chart.

ZornitsaPesheva commented 1 month ago

Please check if this is what you want: https://code.balkan.app/org-chart-js/change-cursor-on-pan-start-and-pan-end#CSSl

wcarson commented 1 month ago

This is perfect! Thank you.