The new [B4X] ZoomImageView is a pleasant enrichment of the B4X views.
However, for a some use cases, after changing the zoom and position the new status should be saved so that it can be restored later.
In @SNOUHyhQs2's JSTouchImageView the values for "currentzoom" and "x" and "y" could be taken over after a move event:
The view would gain in usability if it were extended by e.g. a "Sub xyz_MoveEnded(scale as float, centerx as float, centery as float)" event.
However, for a some use cases, after changing the zoom and position the new status should be saved so that it can be restored later.
In @SNOUHyhQs2's JSTouchImageView the values for "currentzoom" and "x" and "y" could be taken over after a move event:
B4X:
Sub JSTouchImageView1_OnMove
Dim point As JavaObject = JSTouchImageView1.ScrollPosition
jsActiveImageData.centerpx = point.GetField("x")
jsActiveImageData.centerpy = point.GetField("y")
jsActiveImageData.scale = JSTouchImageView1.CurrentZoom
End Sub
The view would gain in usability if it were extended by e.g. a "Sub xyz_MoveEnded(scale as float, centerx as float, centery as float)" event.