kgabryje commented on code in PR #36051:
URL: https://github.com/apache/superset/pull/36051#discussion_r2510041494
##########
superset/utils/screenshot_utils.py:
##########
@@ -121,62 +121,52 @@ def take_tiled_screenshot(
)
# Calculate number of tiles needed
- num_tiles = max(1, (dashboard_height + viewport_height - 1) //
viewport_height)
+ num_tiles = max(1, (dashboard_height + tile_height - 1) // tile_height)
logger.info("Taking %s screenshot tiles", num_tiles)
screenshot_tiles = []
for i in range(num_tiles):
# Calculate scroll position to show this tile's content
- scroll_y = dashboard_top + (i * viewport_height)
-
- # Scroll the window to the desired position
- page.evaluate(f"window.scrollTo(0, {scroll_y})")
- logger.debug(
- "Scrolled window to %s for tile %s/%s", scroll_y, i + 1,
num_tiles
- )
+ y = dashboard_top + (i * tile_height)
Review Comment:
True, they're x and y coordinates, but it might not be obvious from first
glance. I'll change that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]