Conversation
|
I’ve pushed the initial changes for this. Would really appreciate it if you could take a look and share any feedback or suggestions.I’d be happy to iterate and refine it further . |
|
Hello @medha-14 Thanks for the work. I have merged #1118 from @ganimtron-10 . Please rebase the PR. Also provide an example for the same to try and test the changes. |
03c9439 to
7dd54da
Compare
|
Hi @maharshi-gor, @ganimtron-10 I’ve completed the required changes and also added the corresponding examples and tests. Could you please review the updates when you get a chance and let me know if anything needs further improvement or fixes? Thanks! |
maharshi-gor
left a comment
There was a problem hiding this comment.
Hello @medha-14 Thank you for the work. Looks good.
I strongly believe that we are repeating work from lineslider2D. @ganimtron-10 should be able to assess better.
I think RingSlider2D should inherit LineSlider2D and just override the methods which are absolutely necessary.
Please provide your view @ganimtron-10 .
Again @medha-14 thanks for work it works as expected, but I think we might need to consider the maintenance as well.
| # self.on_change = lambda ui: None | ||
| # self.on_value_changed = lambda ui: None | ||
| # self.on_moving_slider = lambda ui: None | ||
| # Offer some standard hooks to the user. |
| # # Slider's handle. | ||
| # self.handle = Disk2D(outer_radius=1) | ||
| # self.handle.color = self.default_color | ||
| # Final update |
| Create the slider's circle (Disk2D), the handle (Disk2D) and | ||
| the text (TextBlock2D). | ||
| """ | ||
| # Slider's track |
| # def _get_actors(self): | ||
| # """Get the actors composing this UI component.""" | ||
| # return self.track.actors + self.handle.actors + self.text.actors | ||
| # Slider's handle |
| # """Get the actors composing this UI component.""" | ||
| # return self.track.actors + self.handle.actors + self.text.actors | ||
| # Slider's handle | ||
| self.handle = Disk2D( |
There was a problem hiding this comment.
Why do we not provide option to select the handle type like LineSlider2D?
|
|
||
| # def _add_to_scene(self, scene): | ||
| # """Add all subcomponents or VTK props that compose this UI component. | ||
| # Slider Text |
| # Parameters | ||
| # ---------- | ||
| # scene : scene | ||
| # Add default events listener for this UI component. |
| # self.on_value_changed(self) | ||
| def _update_actors_position(self): | ||
| """Update the position of the internal actors.""" | ||
| # Position the ring center based on the widget's anchor position. |
|
Hi @medha-14 , |
Issue: #1116
Ports
RingSlider2Dto thev2branch following the new UI architecture.Changes
Base Branch
v2