Skip to content

Commit

Permalink
[PE-101] feat: smooth scrolling in editor while dragging and dropping…
Browse files Browse the repository at this point in the history
… nodes (#6233)

* fix: smoother drag scrolling

* fix: refactoring out common fns

* fix: moved to mouse events instead of drag

* fix: improving the drag preview

* fix: added better selection logic

* fix: drag handle new way almost working

* fix: drag-handle old behaviour with better scrolling

* fix: remove experiments

* fix: better scroll thresholds

* fix: transition to drop cursor added

* fix: drag handling speed

* fix: cleaning up listeners

* fix: common out selection and dragging logic

* fix: scroll threshold logic fixed
  • Loading branch information
Palanikannan1437 authored Dec 23, 2024
1 parent 6070ed4 commit 20260f0
Show file tree
Hide file tree
Showing 3 changed files with 254 additions and 181 deletions.
3 changes: 2 additions & 1 deletion packages/editor/src/core/extensions/extensions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export const CoreEditorExtensions = (args: TArguments): Extensions => {
},
},
dropcursor: {
class: "text-custom-text-300",
class:
"text-custom-text-300 transition-all motion-reduce:transition-none motion-reduce:hover:transform-none duration-200 ease-[cubic-bezier(0.165, 0.84, 0.44, 1)]",
},
...(enableHistory ? {} : { history: false }),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/extensions/side-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const SideMenuExtension = (props: Props) => {
ai: aiEnabled,
dragDrop: dragDropEnabled,
},
scrollThreshold: { up: 200, down: 100 },
scrollThreshold: { up: 200, down: 150 },
}),
];
},
Expand Down
Loading

0 comments on commit 20260f0

Please sign in to comment.