Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
6347496c
Commit
6347496c
authored
May 23, 2025
by
rauno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update draggable.tsx
parent
2a3a2cc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
draggable.tsx
...ay/ui/components/errors/dev-tools-indicator/draggable.tsx
+6
-1
No files found.
packages/next/src/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/draggable.tsx
View file @
6347496c
...
...
@@ -172,7 +172,7 @@ export function Draggable({
position
:
'absolute'
,
inset
:
0
,
outline
:
'2px solid blue'
,
opacity
:
0.
25
,
opacity
:
0.
1
,
borderRadius
:
9999
,
}
}
>
...
...
@@ -296,6 +296,11 @@ export function useDrag({
const
intersecting
=
areIntersecting
(
ghostRef
.
current
,
hideRegion
,
20
)
const
damping
=
intersecting
?
0.25
:
1
// what the hell is this?
// well its the translation of the ghost el
// and why we need it because we want to use the
// non dampened coordinates to determine if we are intersecting or not
// otherwise it will take you a lot of movement to "unsnap" from the X region
rawTranslation
.
current
=
{
x
:
rawTranslation
.
current
.
x
+
dx
,
y
:
rawTranslation
.
current
.
y
+
dy
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment