Skip to content

Commit

Permalink
TSK-1040: Support editable for DraggableList (#2932)
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Brechka <anton.brechka@ezthera.com>
  • Loading branch information
mrsadman99 authored Apr 11, 2023
1 parent 29cfc73 commit 9c79f20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/presentation/src/components/DraggableList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
export let calcRank: (doc: DocWithRank, next: DocWithRank) => string
export let showContextMenu: ((evt: MouseEvent, doc: Doc) => void) | undefined = undefined
export let isDraft = false
export let editable = true
const client = getClient()
Expand Down Expand Up @@ -95,7 +96,7 @@
class:is-dragged-over-up={draggingIndex !== null && index < draggingIndex && index === hoveringIndex}
class:is-dragged-over-down={draggingIndex !== null && index > draggingIndex && index === hoveringIndex}
class:drag-over-highlight={index === dragOverIndex}
draggable={true}
draggable={editable}
on:contextmenu|preventDefault={(ev) => checkIsNotDraft(object) && showContextMenu?.(ev, object)}
on:dragstart={(ev) => handleDragStart(ev, index)}
on:dragover|preventDefault={() => {
Expand Down

0 comments on commit 9c79f20

Please sign in to comment.