Skip to content

Commit

Permalink
Use functions as event listeners
Browse files Browse the repository at this point in the history
* snabbdom v2.0.0 removed support for
  loaded/carrying event listeners
  (i.e. passing listener and parameters
  as array), so we replace those
  with 'classic' arrow functions.
  • Loading branch information
fheft committed Sep 15, 2021
1 parent 5683621 commit 180b25d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/editor/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ function previewItem([tw, th], tale, slide, index, active) {
dragging: previewMove.isDragging(),
},
on: {
dragstart: [previewMove.dragStart, index],
dragenter: [previewMove.dragEnter, index],
dragover: [previewMove.dragOver, index, th],
dragleave: [previewMove.dragLeave, index],
drop: [previewMove.drop, index, th],
dragend: [previewMove.dragEnd],
dragstart: ev => previewMove.dragStart(index, ev),
dragenter: ev => previewMove.dragEnter(index, ev),
dragover: ev => previewMove.dragOver(index, th, ev),
dragleave: ev => previewMove.dragLeave(index, ev),
drop: ev => previewMove.drop(index, th, ev),
dragend: ev => previewMove.dragEnd(ev),
},
},
[
Expand Down

0 comments on commit 180b25d

Please sign in to comment.