Fixed undo move losing position
This commit is contained in:
parent
7f979b97dd
commit
515e7a6bf2
|
@ -428,7 +428,10 @@ export function move (data, path, from, options) {
|
||||||
op: 'add',
|
op: 'add',
|
||||||
path,
|
path,
|
||||||
value: result2.revert[0].value,
|
value: result2.revert[0].value,
|
||||||
jsoneditor: result2.revert[0].jsoneditor
|
jsoneditor: {
|
||||||
|
before: options.before,
|
||||||
|
type: result2.revert[0].jsoneditor.type
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -437,7 +440,14 @@ export function move (data, path, from, options) {
|
||||||
return {
|
return {
|
||||||
data: result2.data,
|
data: result2.data,
|
||||||
revert: [
|
revert: [
|
||||||
{op: 'move', from: path, path: from}
|
{
|
||||||
|
op: 'move',
|
||||||
|
from: path,
|
||||||
|
path: from,
|
||||||
|
jsoneditor: {
|
||||||
|
before: options.before
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue