Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 03125dd

Browse filesBrowse files
committed
rename LineSlider -> LinearSelector
1 parent 853acfe commit 03125dd
Copy full SHA for 03125dd

File tree

Expand file treeCollapse file tree

1 file changed

+9
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-9
lines changed

‎fastplotlib/graphics/selectors/_linear.py

Copy file name to clipboardExpand all lines: fastplotlib/graphics/selectors/_linear.py
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
except:
1313
HAS_IPYWIDGETS = False
1414

15-
from ._base import Graphic, GraphicFeature
16-
from .features._base import FeatureEvent
15+
from .._base import Graphic, GraphicFeature
16+
from ..features._base import FeatureEvent
1717

1818

1919
class SliderValueFeature(GraphicFeature):
@@ -69,7 +69,7 @@ def _feature_changed(self, key: Union[int, slice, Tuple[slice]], new_data: Any):
6969
self._call_event_handlers(event_data)
7070

7171

72-
class LineSlider(Graphic):
72+
class LinearSelector(Graphic):
7373
def __init__(
7474
self,
7575
value: int,
@@ -114,7 +114,7 @@ def __init__(
114114
value: :class:`SliderValueFeature`
115115
``value()`` returns the current slider position in world coordinates
116116
use ``value.add_event_handler()`` to add callback functions that are
117-
called when the LineSlider value changes. See feaure class for event pick_info table
117+
called when the LinearSelector value changes. See feaure class for event pick_info table
118118
119119
"""
120120

@@ -140,7 +140,7 @@ def __init__(
140140

141141
self.axis = axis
142142

143-
super(LineSlider, self).__init__(name=name)
143+
super(LinearSelector, self).__init__(name=name)
144144

145145
if thickness < 1.1:
146146
material = pygfx.LineThinMaterial
@@ -188,20 +188,20 @@ def __init__(
188188
self._block_ipywidget_call = False
189189

190190
def _setup_ipywidget_slider(self, widget):
191-
# setup ipywidget slider with callbacks to this LineSlider
191+
# setup ipywidget slider with callbacks to this LinearSelector
192192
widget.value = int(self.value())
193193
widget.observe(self._ipywidget_callback, "value")
194194
self.value.add_event_handler(self._update_ipywidget)
195195
self._plot_area.renderer.add_event_handler(self._set_slider_layout, "resize")
196196

197197
def _update_ipywidget(self, ev):
198-
# update the ipywidget slider value when LineSlider value changes
198+
# update the ipywidget slider value when LinearSelector value changes
199199
self._block_ipywidget_call = True
200200
self.ipywidget_slider.value = int(ev.pick_info["new_data"])
201201
self._block_ipywidget_call = False
202202

203203
def _ipywidget_callback(self, change):
204-
# update the LineSlider if the ipywidget value changes
204+
# update the LinearSelector if the ipywidget value changes
205205
if self._block_ipywidget_call:
206206
return
207207

@@ -214,7 +214,7 @@ def _set_slider_layout(self, *args):
214214

215215
def make_ipywidget_slider(self, kind: str = "IntSlider", **kwargs):
216216
"""
217-
Makes and returns an ipywidget slider that is associated to this LineSlider
217+
Makes and returns an ipywidget slider that is associated to this LinearSelector
218218
219219
Parameters
220220
----------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.