generated from john/python-template
zooming fix
This commit is contained in:
@@ -137,7 +137,7 @@ def _attach_panzoom(host_id: str) -> None:
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
const startScale = fitScale;
|
const startScale = fitScale;
|
||||||
const minScale = 0.1;
|
const minScale = 0.01;
|
||||||
const instance = Panzoom(target, {{
|
const instance = Panzoom(target, {{
|
||||||
maxScale: 32,
|
maxScale: 32,
|
||||||
minScale: minScale,
|
minScale: minScale,
|
||||||
@@ -153,6 +153,7 @@ def _attach_panzoom(host_id: str) -> None:
|
|||||||
requestAnimationFrame(() => {{
|
requestAnimationFrame(() => {{
|
||||||
requestAnimationFrame(() => {{
|
requestAnimationFrame(() => {{
|
||||||
instance.reset({{ animate: false, force: true }});
|
instance.reset({{ animate: false, force: true }});
|
||||||
|
instance.setOptions({{ contain: undefined }});
|
||||||
}});
|
}});
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user