@seafile/sdoc-editor 0.1.52 → 0.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,20 +54,17 @@ export var decorateOperation = function decorateOperation(editor, operation) {
|
|
|
54
54
|
}
|
|
55
55
|
case OPERATION.SET_NODE:
|
|
56
56
|
{
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// newProperties none has id attribute, keep the original id
|
|
61
|
-
newProperties.id = _properties.id;
|
|
62
|
-
newOperation['node_id'] = _properties.id; // the node which will be set to another type
|
|
57
|
+
var _path5 = newOperation.path;
|
|
58
|
+
var _node5 = Node.get(editor, _path5);
|
|
59
|
+
newOperation['node_id'] = _node5.id; // the node which will be set to another type
|
|
63
60
|
break;
|
|
64
61
|
}
|
|
65
62
|
case OPERATION.MOVE_NODE:
|
|
66
63
|
{
|
|
67
|
-
var
|
|
68
|
-
var
|
|
64
|
+
var _path6 = newOperation.path;
|
|
65
|
+
var _node6 = Node.get(editor, _path6);
|
|
69
66
|
// move operation not change the node's id
|
|
70
|
-
newOperation['node_id'] =
|
|
67
|
+
newOperation['node_id'] = _node6.id; // moved node's id
|
|
71
68
|
break;
|
|
72
69
|
}
|
|
73
70
|
default:
|