This commit is contained in:
Dean 2024-11-26 16:56:43 +00:00
parent 293abc80e1
commit 0eb83239dd
1 changed files with 0 additions and 8 deletions

View File

@ -44,7 +44,6 @@
w: contentDims.original.w, w: contentDims.original.w,
h: contentDims.original.h, h: contentDims.original.h,
} }
dragOffset = []
contentPos.update(state => ({ contentPos.update(state => ({
...state, ...state,
x: 0, x: 0,
@ -135,9 +134,6 @@
// Size of the view port // Size of the view port
let viewDims = {} let viewDims = {}
// When dragging the content, maintain the drag start offset
let dragOffset = []
// Edge around the draggable content // Edge around the draggable content
let contentDragPadding = 200 let contentDragPadding = 200
@ -356,7 +352,6 @@
const onViewDragEnd = () => { const onViewDragEnd = () => {
down = false down = false
dragOffset = [0, 0]
} }
const handleDragDrop = () => { const handleDragDrop = () => {
@ -381,7 +376,6 @@
viewDragOffset = [0, 0] viewDragOffset = [0, 0]
if ($view.dragging) { if ($view.dragging) {
dragOffset = [0, 0]
view.update(state => ({ view.update(state => ({
...state, ...state,
dragging: false, dragging: false,
@ -491,8 +485,6 @@
return return
} }
const { x, y } = eleXY(e, viewPort) const { x, y } = eleXY(e, viewPort)
dragOffset = [Math.abs(x - $contentPos.x), Math.abs(y - $contentPos.y)]
} }
const isDraggable = e => { const isDraggable = e => {