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

Fixes #4110
This commit is contained in:
Joe Cheng
2024-07-31 09:31:31 -07:00
committed by GitHub
parent 4bc330e5dd
commit 43d36c08dc
6 changed files with 13 additions and 20 deletions

View File

@@ -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
@@ -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

View File

@@ -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;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -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 &&