question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: interactions misaligned when plot is inside transform: scale()-ed element

See original GitHub issue

See http://codepen.io/hellochar/pen/JKgXPE and mouse around.

Looks like plotly.js miscalculates where the mouse is positioned if the plot itself is rendered inside an element with a transform: scale() CSS property set. The tooltips don’t match up with where the mouse is. This is most apparent when you try to click+drag an area of the plot and it clearly shows the locations don’t match up.

The buttons in the toolbar line up correctly, as does the hitbox for dragging the axes or enabling/disabling specific traces.

Also it looks like if you’re at the top-left corner of the plot, the mouse position is accurate (that is, the (0, 0) origin point is handled correctly; only the scaling factor is off).

Also see https://github.com/palantir/plottable/issues/1644 which looks to be the same issue in Plottable.

Let me know if that makes sense and if there’s something else I can do!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
archmojcommented, Oct 22, 2020

https://github.com/plotly/plotly.js/pull/5193 with some adjustments is getting close to address this issue.

2reactions
nicolaskruchtencommented, Nov 19, 2020

This issue was tagged as “needs sponsorship” and was instead resolved by the contribution of an excellent pull request for this long-standing issue. Thank you so much for taking the initiative on this @alexhartstone!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug with transform: scale and overflow: hidden in Chrome
I have an iFrame video scaled larger using transform: scale() in a div, and on the latest Chrome version, it was no longer...
Read more >
Chapter 3 Registration - Insight Toolkit
Image registration is the process of determining the spatial transform that maps points from one image to homologous points on a object in...
Read more >
CUDA C++ Best Practices Guide
The programming guide to using the CUDA Toolkit to obtain the best performance from NVIDIA GPUs.
Read more >
Changelog - ggplot2 - Tidyverse
Fix a bug in geom_abline() that resulted in intercept not being subjected to the transformation of the y scale (@thomasp85, #3741).
Read more >
Fixed Problem Reports - Siemens PLM
This is due to the geometry of tetras and the arrangement of tetra elements in the mesh. Before GFEM creates an outline it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found