diff --git a/package.json b/package.json index 15a79d10..937ce192 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mind-elixir", - "version": "3.3.1", + "version": "3.3.2", "type": "module", "description": "Mind elixir is a free open source mind map core.", "keywords": [ diff --git a/src/index.ts b/src/index.ts index d3066c13..04925959 100644 --- a/src/index.ts +++ b/src/index.ts @@ -128,7 +128,7 @@ MindElixir.DARK_THEME = DARK_THEME * @memberof MindElixir * @static */ -MindElixir.version = '3.3.1' +MindElixir.version = '3.3.2' /** * @function * @memberof MindElixir diff --git a/src/utils/objectManipulation.ts b/src/utils/objectManipulation.ts index 2433678f..e20a8562 100644 --- a/src/utils/objectManipulation.ts +++ b/src/utils/objectManipulation.ts @@ -59,12 +59,14 @@ export function moveNodeObj(from: NodeObj, to: NodeObj) { } export function moveNodeBeforeObj(from: NodeObj, to: NodeObj) { + if (from.direction !== undefined) from.direction = to.direction removeNodeObj(from) const { siblings, index } = getSibling(to) siblings.splice(index, 0, from) } export function moveNodeAfterObj(from: NodeObj, to: NodeObj) { + if (from.direction !== undefined) from.direction = to.direction removeNodeObj(from) const { siblings, index } = getSibling(to) siblings.splice(index + 1, 0, from)