roundabout,
created on Monday, 6 January 2025, 14:13:29 (1736172809),
received on Tuesday, 7 January 2025, 08:25:28 (1736238328)
Author identity: vlad <vlad.muntoiu@gmail.com>
b4d8c86815de8ddec03893591587848f0abacaf0
static/picture-annotation.py
@@ -718,17 +718,10 @@ def on_wheel(event):
event.preventDefault() scale_exponent += (-1 if event.deltaY > 0 else 1) / 16# Adjust scale exponent and compute new scale scale_exponent += (-1 if event.deltaY > 0 else 1) / 4new_scale = 2 ** scale_exponent rect = zoom_container.getBoundingClientRect()pointer_x = event.clientX - rect.leftpointer_y = event.clientY - rect.toptranslate_x = pointer_x - (pointer_x - translate_x) * (new_scale / scale)translate_y = pointer_y - (pointer_y - translate_y) * (new_scale / scale)# Update scalescale = new_scale update_transform()