Skip to content

Draggable Graphics#413

Closed
kushalkolar wants to merge 8 commits into
mainfrom
drag-feature
Closed

Draggable Graphics#413
kushalkolar wants to merge 8 commits into
mainfrom
drag-feature

Conversation

@kushalkolar

Copy link
Copy Markdown
Member

closes #407

@kushalkolar kushalkolar requested a review from clewis7 February 27, 2024 16:49

@clewis7 clewis7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, purpose of this PR is to create base class for handling moving Graphics?

LGTM codewise

I'm not sure I understand the relevancy of clip and multiplier. It looks like they are mostly always going to be None?

Comment thread fastplotlib/graphics/_base.py Outdated
collection_index: int
if relevant, the sub-index of this Graphic within the GraphicCollection

draggable: bool, default ``False``

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to clarify here: at this point in time all graphics are draggable right?

Comment thread fastplotlib/graphics/_features/_drag.py
@kushalkolar kushalkolar marked this pull request as ready for review March 1, 2024 06:28
collection_index: int
if relevant, the sub-index of this Graphic within the GraphicCollection

draggable: one of ``None``, ``"mouse"``, ``"kb"``, or ``"mouse+kb"``, default ``None``

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe specify that "kb" here is keyboard

return self._multiplier

@multiplier.setter
def multiplier(self, value: np.ndarray):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be more parsing here for size of value passed? Should always be a (1,3)

Also, should we allow passing a single float that would apply to xyz?

@kushalkolar

kushalkolar commented Mar 20, 2024

Copy link
Copy Markdown
Member Author

on hold until pygfx/pygfx#665

@kushalkolar kushalkolar marked this pull request as draft March 23, 2024 03:05
@kushalkolar

Copy link
Copy Markdown
Member Author

I forgot what usecase this was for, let's close unless we come across a usecase again

@kushalkolar kushalkolar closed this May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Base class for moveable Graphic

2 participants