Skip to content

Commit

Permalink
fix drag and drop editor
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Feb 26, 2024
1 parent db85fe6 commit 6a21bc0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/dashboard-refactor/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4048,6 +4048,12 @@ export class DashboardLogic extends UILogic<State, Events> {
}

dragList: EventHandler<'dragList'> = async ({ event, previousState }) => {
this.emitMutation({
listsSidebar: {
draggedListId: { $set: event.listId },
someListIsDragging: { $set: true },
},
})
const crt = this.options.document?.getElementById(DRAG_EL_ID)
crt.style.display = 'block'
event.dataTransfer.setDragImage(crt, 0, 0)
Expand All @@ -4059,13 +4065,6 @@ export class DashboardLogic extends UILogic<State, Events> {
}

event.dataTransfer.setData('text/plain', JSON.stringify(action))

this.emitMutation({
listsSidebar: {
draggedListId: { $set: event.listId },
someListIsDragging: { $set: true },
},
})
}

dropList: EventHandler<'dropList'> = async () => {
Expand Down

0 comments on commit 6a21bc0

Please sign in to comment.