GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fix BaseSelector move_to_pointer · Issue #588 · fastplotlib/fastplotlib Closed Descriptionso this has been broken for a while, this should fix it, will PR later: Subject: [PATCH] a --- Index: fastplotlib/graphics/selectors/_base_selector.py IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/fastplotlib/graphics/selectors/_base_selector.py b/fastplotlib/graphics/selectors/_base_selector.py --- a/fastplotlib/graphics/selectors/_base_selector.py (revision 84b23e8b03228b003212940205630cf7be75c5cb) +++ b/fastplotlib/graphics/selectors/_base_selector.py (date 1723148098223) @@ -269,7 +269,12 @@ """ Calculates delta just using current world object position and calls self._move_graphic(). """ - current_position: np.ndarray = self.offset + if self.axis == "x": + offset = self.offset[0] + elif self.axis == "y": + offset = self.offset[1] + + current_pos_world: np.ndarray = self.selection + offset # middle mouse button clicks if ev.button != 3: @@ -281,18 +286,18 @@ if world_pos is None: return - self.delta = world_pos - current_position + self.delta = world_pos - current_pos_world self._pygfx_event = ev # use fill by default as the source, such as in region selectors if len(self._fill) > 0: self._move_info = MoveInfo( - last_position=current_position, source=self._fill[0] + last_position=current_pos_world, source=self._fill[0] ) # else use an edge, such as for linear selector else: self._move_info = MoveInfo( - last_position=current_position, source=self._edges[0] + last_position=current_pos_world, source=self._edges[0] ) self._move_graphic(self.delta) ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |