Skip to content

Commit

Permalink
chore: fix more TypeScript issues
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Dec 15, 2023
1 parent 904dabe commit 67a3eb3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/controls/createAutoScrollHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function createAutoScrollHandler(scrollableElement: Element) {
}
}

function onDrag(event: DragEvent) {
function onDrag(event: MouseEvent) {
if (scrollableElement) {
const y = event.clientY
const { top, bottom } = scrollableElement.getBoundingClientRect()
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/modes/treemode/JSONNode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
}
}
function handleMouseMoveGlobal(event: Event) {
function handleMouseMoveGlobal(event: MouseEvent) {
context.onDrag(event)
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/modes/treemode/TreeMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@
$: autoScrollHandler = refContents ? createAutoScrollHandler(refContents) : undefined
function handleDrag(event: DragEvent) {
function handleDrag(event: MouseEvent) {
if (autoScrollHandler) {
autoScrollHandler.onDrag(event)
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export interface TreeModeContext extends JSONEditorContext {
onExpandSection: (path: JSONPath, section: Section) => void
onContextMenu: OnContextMenu
onClassName: OnClassName
onDrag: (event: Event) => void
onDrag: (event: MouseEvent) => void
onDragEnd: () => void
}

Expand Down

0 comments on commit 67a3eb3

Please sign in to comment.