mirror of
https://github.com/penpot/penpot.git
synced 2025-07-18 21:47:13 +02:00
🐛 Fix new render zoom (#6488)
* 🐛 Fix new render zoom * 🐛 Use scale instead of just zoom in get_tiles_for_viewbox --------- Co-authored-by: Belén Albeza <belen@hey.com>
This commit is contained in:
parent
ad87e9842d
commit
0cb6e0dee2
2 changed files with 13 additions and 9 deletions
|
@ -36,9 +36,9 @@ pub fn get_tiles_for_viewbox(viewbox: Viewbox, scale: f32) -> (i32, i32, i32, i3
|
|||
pub fn get_tiles_for_viewbox_with_interest(
|
||||
viewbox: Viewbox,
|
||||
interest: i32,
|
||||
dpr: f32,
|
||||
scale: f32,
|
||||
) -> (i32, i32, i32, i32) {
|
||||
let (sx, sy, ex, ey) = get_tiles_for_viewbox(viewbox, dpr);
|
||||
let (sx, sy, ex, ey) = get_tiles_for_viewbox(viewbox, scale);
|
||||
(sx - interest, sy - interest, ex + interest, ey + interest)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue