React-diagrams: Scroll Zoom in Firefox / Adjust zoom sensitivity

Created on 10 Jul 2019  路  4Comments  路  Source: projectstorm/react-diagrams

Zooming in Firefox still seems to be broken?

Would a more future proof solution be adding a zoomSensitivity prop to the <DiagramWidget/>?

Even as browsers change their behavior and being cross compatible, you could dynamically change the zoomSensitivity level based on the browser.

const zoom_sensitivity = 1.2;

<DiagramWidget
  zoomSensitivity={zoom_sensitivity}
  diagramEngine={this.engine}
/>
bug feature request

Most helpful comment

In case anyone needs some guidance, I've implemented a custom zoom action that allows only for a limited number of zoom levels. You can check out the code in this commit: https://github.com/renato-bohler/logossim/pull/22/commits/dbc1b8b8a804d4c2974d1e5cf86d039ef32f6acc

All 4 comments

Following up here:

Do we think that the issue is cross browser entirely or is there a system component? I.e., is it feasible to add code to autodetect the correct zoom sensitivity, or will certain systems+browser combos always be wonky?

Has there been any info about this? As far as I can tell it's still slow on firefox and I can't seem to figure out if there's a way to change sensitivity yet?

@Blackpinned I've found a solution to this, as I posted here: https://github.com/projectstorm/react-diagrams/issues/516#issuecomment-572021438.

I'm not sure if this is a good solution, and that's why I haven't opened a pull request with these changes... but you could apply them to your project if you really need.

In case anyone needs some guidance, I've implemented a custom zoom action that allows only for a limited number of zoom levels. You can check out the code in this commit: https://github.com/renato-bohler/logossim/pull/22/commits/dbc1b8b8a804d4c2974d1e5cf86d039ef32f6acc

Was this page helpful?
0 / 5 - 0 ratings

Related issues

t-gacema picture t-gacema  路  4Comments

Nesterov-Konstantin picture Nesterov-Konstantin  路  4Comments

schecter22107 picture schecter22107  路  3Comments

Naveenraj006 picture Naveenraj006  路  3Comments

affanshahid picture affanshahid  路  3Comments