Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Add preview ref api for Node#133

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
spellforce wants to merge1 commit intobrimdata:main
base:main
Choose a base branch
Loading
fromspellforce:addMoreApi

Conversation

spellforce
Copy link

Issues

One of the phenomena of Chrome browsers on Mac is that outside the DND range, the Drag or Drop event will be delayed by 250ms, because to play the animation, react-DND usespreview(getEmptyImage());. Going to overlay causes a problem: it looks stuttering

20230321095759

So the default preview was removed, the default preview was changed to react-dnd's preview, and the preview interface was exposed

20230321100313

This feature only affects the default effect

@spellforcespellforceforce-pushed theaddMoreApi branch 2 times, most recently from019947c toa342e61CompareMarch 21, 2023 09:21
@jameskerr
Copy link
Contributor

This does look much better! I'm not as familiar with the drag and drop api. How would you style the drag preview?

node:NodeApi<T>;
tree:TreeApi<T>;
dragHandle?:(el:HTMLDivElement|null)=>void;
previewHandle?:(el:HTMLDivElement|null)=>void;
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this previewHandle get used?

Copy link
Author

@spellforcespellforceMay 12, 2023
edited
Loading

Choose a reason for hiding this comment

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

it will be used in nodeRender, if user need. They can custom preview div ref.
such as :

<div ref={previewHandle}><dragImg ref={dragHandle} />im a test</div>

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh ok, I see.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@jameskerrjameskerrjameskerr left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@spellforce@jameskerr

[8]ページ先頭

©2009-2025 Movatter.jp