File tree 1 file changed +9
-7
lines changed
packages/dom/src/core/plugins/feedback
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import {
16
16
generateUniqueId ,
17
17
getDocument ,
18
18
getFrameTransform ,
19
- type Transform ,
20
19
DOMRectangle ,
21
20
getFrameElement ,
22
21
} from '@dnd-kit/dom/utilities' ;
@@ -155,20 +154,23 @@ export class Feedback extends Plugin<DragDropManager, FeedbackOptions> {
155
154
x : initialCoordinates . x - relativeLeft ,
156
155
y : initialCoordinates . y - relativeTop ,
157
156
} ;
157
+
158
158
const sizeDelta = {
159
159
width :
160
- ( initialSize . width / initialFrameTransform . scaleX -
161
- width / frameTransform . scaleX ) *
160
+ ( initialSize . width * initialFrameTransform . scaleX -
161
+ width * frameTransform . scaleX ) *
162
162
transformOrigin . x ,
163
163
height :
164
- ( initialSize . height / initialFrameTransform . scaleY -
165
- height / frameTransform . scaleY ) *
164
+ ( initialSize . height * initialFrameTransform . scaleY -
165
+ height * frameTransform . scaleY ) *
166
166
transformOrigin . y ,
167
167
} ;
168
+
168
169
const delta = {
169
- x : coordinatesDelta . x / frameTransform . scaleX - sizeDelta . width ,
170
- y : coordinatesDelta . y / frameTransform . scaleY - sizeDelta . height ,
170
+ x : coordinatesDelta . x / frameTransform . scaleX + sizeDelta . width ,
171
+ y : coordinatesDelta . y / frameTransform . scaleY + sizeDelta . height ,
171
172
} ;
173
+
172
174
const projected = {
173
175
left : left + delta . x ,
174
176
top : top + delta . y ,
You can’t perform that action at this time.
0 commit comments