From 6d46318365ee9106aab59264fc6e8fa4882d9009 Mon Sep 17 00:00:00 2001 From: jvo203 Date: Tue, 29 Jan 2019 16:41:31 +0900 Subject: [PATCH] finally fixed sharing the zoom scale across #image_rectangle elements --- htdocs/fitswebql/fitswebql.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/fitswebql/fitswebql.js b/htdocs/fitswebql/fitswebql.js index 4b0f28e3..a21d3f9a 100644 --- a/htdocs/fitswebql/fitswebql.js +++ b/htdocs/fitswebql/fitswebql.js @@ -7470,7 +7470,7 @@ function setup_image_selection_index(index, topx, topy, img_width, img_height) { } }); - zoom.scaleTo(rect, zoom_scale); + zoom.scaleTo(rect, zoom_scale); } function setup_image_selection() { @@ -8680,7 +8680,8 @@ function tiles_zoomed() { refresh_tiles(i); //keep zoom scale in sync across all images - d3.select("#image_rectangle" + i).__zoom = zoom_scale; + var elem = d3.select("#image_rectangle" + i); + elem.node().__zoom.k = zoom_scale; } var tmp = d3.select(this);