def on_touch_up(self, touch: MotionEvent):
        ScatterLayout.on_touch_up(self, touch)
        dx, dy = touch.ox - touch.x, touch.oy - touch.y

        if (graphicsConfig.getint("BaseLayout", "maximum_move_distance_for_select") * -1) <= dx <= \
                graphicsConfig.getint("BaseLayout", "maximum_move_distance_for_select") and \
                (graphicsConfig.getint("BaseLayout", "maximum_move_distance_for_select") * -1) <= dy <= \
                graphicsConfig.getint("BaseLayout", "maximum_move_distance_for_select") and not \
                touch.is_mouse_scrolling and touch.grab_current == self:

            self.log_deep_debug(
                "Touch up and within 5 of touch origin, running base layout building select"
            )
            self.base_layout_on_touch_up_function(*self.to_local(*touch.pos))

        self.fix_transform_edges(touch)
Exemplo n.º 2
0
 def on_touch_up(self, touch):
     #clear only if we clicked in the stencil view
     CLEAR = self.parent.collide_point(*touch.pos)
     for widget in self.designer.current_template.children:
         if widget.collide_point(*widget.parent.to_widget(*touch.pos)):
             CLEAR = False
     if CLEAR:
             self.designer.selections = dict()
             self.designer.last_selected = None
     return ScatterLayout.on_touch_up(self, touch)
Exemplo n.º 3
0
 def on_touch_up(self, touch):
     #clear only if we clicked in the stencil view
     CLEAR = self.parent.collide_point(*touch.pos)
     for widget in self.designer.current_template.children:
         if widget.collide_point(*widget.parent.to_widget(*touch.pos)):
             CLEAR = False
     if CLEAR:
         self.designer.selections = dict()
         self.designer.last_selected = None
     return ScatterLayout.on_touch_up(self, touch)