Small changes for javascript formatted and structure

This commit is contained in:
Peter Stuifzand 2020-10-31 23:28:29 +01:00
parent 398a554c5d
commit ca8afb0cbe
4 changed files with 10 additions and 7 deletions

View File

@ -8,14 +8,14 @@ function cursorInsideLink(value, pos) {
if (start === pos) { if (start === pos) {
return [null, false]; return [null, false];
} }
if (start === pos-1) { if (start === pos - 1) {
return [null, false]; return [null, false];
} }
let linkEnd = value.lastIndexOf("]]", pos-1) let linkEnd = value.lastIndexOf("]]", pos - 1)
return [start+2, start >= linkEnd] return [start + 2, start >= linkEnd]
} }
export default { export default {
cursorInsideLink cursorInsideLink,
} }

View File

@ -315,7 +315,7 @@ function editor(root, inputData, options) {
function enableDragging(rootElement) { function enableDragging(rootElement) {
let drake = dragula([rootElement], { let drake = dragula([rootElement], {
moves: function (el, container, handle) { moves: function (el, container, handle, sibling) {
return handle.classList.contains('marker') return handle.classList.contains('marker')
} }
}); });

View File

@ -1,5 +1,6 @@
import _ from 'lodash'; 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 * NOTE: Store should contain all methods that work with items. At the moment

View File

@ -17,4 +17,6 @@ function rotate(a, from, to, k) {
} }
} }
export default rotate; export default {
rotate
};