1.0.10 • Published 3 years ago

@figsify/react-new-orgchart v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

OrgChart

Why the fork on top of a fanstastic fork job?

  • Simply I need to have pdf export enabled to existing library; I do recommend to use original fork if there's no requirement for pdf export

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 @figsify/react-new-orgchart