diff --git a/editor/src/util.js b/editor/src/util.js index a166564..e62e292 100644 --- a/editor/src/util.js +++ b/editor/src/util.js @@ -8,14 +8,14 @@ function cursorInsideLink(value, pos) { if (start === pos) { return [null, false]; } - if (start === pos-1) { + if (start === pos - 1) { return [null, false]; } - let linkEnd = value.lastIndexOf("]]", pos-1) - return [start+2, start >= linkEnd] + let linkEnd = value.lastIndexOf("]]", pos - 1) + return [start + 2, start >= linkEnd] } export default { - cursorInsideLink + cursorInsideLink, } diff --git a/list-editor/index.js b/list-editor/index.js index 1e8cc42..5b8cdfb 100644 --- a/list-editor/index.js +++ b/list-editor/index.js @@ -315,7 +315,7 @@ function editor(root, inputData, options) { function enableDragging(rootElement) { let drake = dragula([rootElement], { - moves: function (el, container, handle) { + moves: function (el, container, handle, sibling) { return handle.classList.contains('marker') } }); diff --git a/list-editor/store.js b/list-editor/store.js index 532e085..4d4836c 100644 --- a/list-editor/store.js +++ b/list-editor/store.js @@ -1,5 +1,6 @@ import _ from 'lodash'; -import rotate from './util' +import util from './util' +let rotate = util.rotate; /** * NOTE: Store should contain all methods that work with items. At the moment diff --git a/list-editor/util.js b/list-editor/util.js index fecd9b5..d31e7fd 100644 --- a/list-editor/util.js +++ b/list-editor/util.js @@ -17,4 +17,6 @@ function rotate(a, from, to, k) { } } -export default rotate; +export default { + rotate +};