Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove double-scaling in coordmap.getPanelCss() #4111

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# shiny (development version)

## Bug fixes

* Fixed a bug introduced in v1.9.0 where the boundaries of hover/click/brush regions on plots were being incorrectly scaled when browser zoom was used. (#4111)

# shiny 1.9.0

## New busy indication feature
Expand Down Expand Up @@ -31,6 +35,7 @@ In addition, various properties of the spinners and pulse can be customized with
* Output bindings that are removed, invalidated, then inserted again (while invalidated) now correctly include the `.recalculating` CSS class. (#4039)

* Fixed a recent issue with `uiOutput()` and `conditionalPanel()` not properly lower opacity when recalculation (in a Bootstrap 5 context). (#4027)

* Image outputs that were scaled by CSS had certain regions that were unresponsive to hover/click/brush handlers. (#3234)

# shiny 1.8.1.1
Expand Down
8 changes: 1 addition & 7 deletions inst/www/shared/shiny.js
Original file line number Diff line number Diff line change
Expand Up @@ -14583,13 +14583,7 @@
var dists = [];
var i5;
for (i5 = 0; i5 < coordmap.panels.length; i5++) {
var panelRange = coordmap.panels[i5].range;
var b3 = {
top: panelRange.top * cssToImgRatio.y,
bottom: panelRange.bottom * cssToImgRatio.y,
left: panelRange.left * cssToImgRatio.x,
right: panelRange.right * cssToImgRatio.x
};
var b3 = coordmap.panels[i5].range;
if (x2 <= b3.right + expandImg.x && x2 >= b3.left - expandImg.x && y4 <= b3.bottom + expandImg.y && y4 >= b3.top - expandImg.y) {
matches.push(coordmap.panels[i5]);
var xdist = 0;
Expand Down
4 changes: 2 additions & 2 deletions inst/www/shared/shiny.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/www/shared/shiny.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions inst/www/shared/shiny.min.js.map

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions srcts/src/imageutils/initCoordmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,7 @@ function initCoordmap(
let i;

for (i = 0; i < coordmap.panels.length; i++) {
const panelRange = coordmap.panels[i].range;
const b = {
top: panelRange.top * cssToImgRatio.y,
bottom: panelRange.bottom * cssToImgRatio.y,
left: panelRange.left * cssToImgRatio.x,
right: panelRange.right * cssToImgRatio.x,
};
const b = coordmap.panels[i].range;

if (
x <= b.right + expandImg.x &&
Expand Down
Loading