How can I limit Scatter translation ?

20 views
Skip to first unread message

caracteriel

unread,
Aug 22, 2016, 1:32:07 PM8/22/16
to Kivy users support

Hi,

Do you know how can I limit (x,y) translation of the scatter widget ?
I have tried with bbox parameter but I can make it worked

Thank you for any help

Karla Muguerza

unread,
Aug 24, 2016, 11:55:28 AM8/24/16
to Kivy users support
Hi, 

You can use the on_transform_with_touch function for left, right, top and bottom limits. 

def on_transform_with_touch(self, touch):
 if self.center_x < 0:
     self.center_x = 0

 if self.center_y < 0:
     self.center_y = 0
Reply all
Reply to author
Forward
0 new messages