I would like to pan image loaded into the ImageView.
ImageView1 is parent P_map Pane.
I have attached my project.
My Pan ImageView code is below, but I need to help to amend it.
Code is not as to has to be.
If someone know solution, please give advice.
My code:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			ImageView1 is parent P_map Pane.
I have attached my project.
My Pan ImageView code is below, but I need to help to amend it.
Code is not as to has to be.
If someone know solution, please give advice.
My code:
			
				B4X:
			
		
		
		Sub P_map_MouseDragged (EventData As MouseEvent)
    ox =  EventData.X
    oy =  EventData.Y
    
    If ox < zox Then
        ImageView1.Left = ImageView1.Left - 3
    Else If ox > zox Then
        ImageView1.Left = ImageView1.Left + 3
Else If ox = zox Then
    ImageView1.Left = ImageView1.Left
    End If
    
    If oy < zoy Then
        ImageView1.Top = ImageView1.Top - 3
    Else If oy > zoy Then
        ImageView1.Top = ImageView1.Top + 3
Else If oy = zoy Then
    ImageView1.Top = ImageView1.Top
    End If
End Sub
Sub P_map_MousePressed (EventData As MouseEvent)
    zox =  EventData.X
    zoy = EventData.Y
End Sub