Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an offset option for cursor location within mid-drag image #126

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cameron-toy
Copy link

@cameron-toy cameron-toy commented Oct 29, 2020

This change adds optional dragAdjustX and dragAdjustY options for Drag objects. This allows the cursor to be somewhere other than the upper left corner of the drag image during a drag.

Without adjust

old_drag

With adjust

new_drag

Background (shameless plug): I originally used this hacked version of lumino dragdrop for the JupyterLab Interactive Dashboard Editor and figured the changes would be useful in core.

Fixes #347

dependabot bot and others added 2 commits October 29, 2020 19:41
added drag offset to findScrollTarget

made drag offset optional

added optional drag offset
@afshin
Copy link
Member

afshin commented Dec 15, 2020

Hi @cameron-toy! Thanks for the PR! This change seems useful to me.

Could you please:

  1. Add docstrings to the implementation in the class?
  2. Add these to the tests because they are public API?

@afshin afshin added the enhancement New feature or request label Aug 7, 2022
@afshin afshin marked this pull request as draft August 7, 2022 16:27
@afshin afshin self-assigned this Aug 7, 2022
@afshin afshin added this to the Lumino 2 milestone Aug 8, 2022
@afshin afshin changed the title Drag image offset All an offset option for cursor location within mid-drag image Aug 8, 2022
@afshin afshin changed the title All an offset option for cursor location within mid-drag image Add an offset option for cursor location within mid-drag image Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support offseting the location of the cursor within a dragged image mid-flight
2 participants