Skip to content

Commit 5e29bb1

Browse files
committed
fix: set direction after moving node
fixed #219
1 parent b8390f4 commit 5e29bb1

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mind-elixir",
3-
"version": "3.3.1",
3+
"version": "3.3.2",
44
"type": "module",
55
"description": "Mind elixir is a free open source mind map core.",
66
"keywords": [

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ MindElixir.DARK_THEME = DARK_THEME
128128
* @memberof MindElixir
129129
* @static
130130
*/
131-
MindElixir.version = '3.3.1'
131+
MindElixir.version = '3.3.2'
132132
/**
133133
* @function
134134
* @memberof MindElixir

src/utils/objectManipulation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ export function moveNodeObj(from: NodeObj, to: NodeObj) {
5959
}
6060

6161
export function moveNodeBeforeObj(from: NodeObj, to: NodeObj) {
62+
if (from.direction !== undefined) from.direction = to.direction
6263
removeNodeObj(from)
6364
const { siblings, index } = getSibling(to)
6465
siblings.splice(index, 0, from)
6566
}
6667

6768
export function moveNodeAfterObj(from: NodeObj, to: NodeObj) {
69+
if (from.direction !== undefined) from.direction = to.direction
6870
removeNodeObj(from)
6971
const { siblings, index } = getSibling(to)
7072
siblings.splice(index + 1, 0, from)

0 commit comments

Comments
 (0)