Ejemplo n.º 1
0
 def get_hotspots(self):
     if not self._hotspots:
         # self._hotspots = self.collect_hotspots(ItemCallback)
         self._hotspots.append(
             HotSpotBehavior.make_hotspot_description(
                 'item_click',
                 self.pos + self.size,
                 allow_expand=False))
     return self._hotspots
Ejemplo n.º 2
0
 def get_hotspots(self):
     if not self._hotspots:
         self._hotspots = self.collect_hotspots(ItemCallback)
         w, h = map(int, map(operator.mul, post_click_area, self.size))
         x, y = map(int, map(operator.sub, self.center, (w / 2, h / 2)))
         self._hotspots.append(
             HotSpotBehavior.make_hotspot_description('item_click',
                                                      [x, y, w, h],
                                                      allow_expand=False))
     return self._hotspots
Ejemplo n.º 3
0
 def get_hotspots(self):
     if not self._hotspots:
         self._hotspots = self.collect_hotspots(ItemCallback)
         w, h = map(int, map(operator.mul, post_click_area, self.size))
         x, y = map(int, map(operator.sub, self.center, (w/2, h/2)))
         self._hotspots.append(
             HotSpotBehavior.make_hotspot_description(
                 'item_click',
                 [x, y, w, h],
                 allow_expand=False))
     return self._hotspots