@jearaneda/react-new-orgchart
v1.0.8
Published
An OrgChart fork with a focus on readability and compatibility with bulky diagrams.
Downloads
5
Maintainers
Readme
Why use this fork?
Panning is now drag-to-scroll based, deprecating the transform CSS property logic. This avoids scrolling and visualization issues when rendering a large OrgChart.
Zooming is now scale() based. The main benefit of this change is that the ChartContainer module is simpler and easier to read when compared to the transformation-matrix splitting shenanigans. Using zoom() was a good enough alternative, but it is non-standard.
Orgchart downloading is now handled by the dom-to-image library. Dom-to-image has better predictability when dealing with large images, doesn't screw up your snapshot when scrolling, and is 70x faster.
Canvas maximum size limits are taken into account. Due to browser limitations, rendering a canvas with dimensions greater than 16384x16384 will result in a faulty, cropped snapshot. Thus, exporting a bulky OrgChart wasn't really possible. I solved this by scaling down any drawn images larger than the limit.
Props
Methods
Install
npm install @jearaneda/react-new-orgchart