woodenconsulting / react-js-diagrams

A flow based diagramming library written in React
MIT License
220 stars 61 forks source link

Disable zoom, select multiple and hotkeys #5

Closed garykw closed 7 years ago

garykw commented 7 years ago

Is there a prop we can pass to the DiagramWidget which will disable zoom, disable drag all items, not allow loose link and also remove key down listeners?

woodenconsulting commented 7 years ago

Hey @garywong89 sorry for the late response, I just got back from vacation. I think this is totally doable, I'll work something up here in the next day or two.

garykw commented 7 years ago

Hey @woodenconsulting, I ended adding a custom DiagramWidget to implement the features described above. I can send a pr to add these features to this repo also if there is a specific style guide you wish for the request.

garykw commented 7 years ago

@woodenconsulting I also believe @umarashfaq created a fork on https://github.com/woodenconsulting/react-js-diagrams/issues/6 and https://github.com/woodenconsulting/react-js-diagrams/issues/7 which solves the issue mentioned above.

woodenconsulting commented 7 years ago

@garywong89 I've added the functionality you requested, it along with the issues raised by @umarashfaq have been published on npm (version 3.1.0). If there's something missing or more that you're looking for, please create a PR as I'm happy for the contributions! I'll be adding some contributor guidelines in the future, but until then I use Airbnb's style guide, except that I allow stage 2+.