Commit 4c26306c authored by hy's avatar hy

增加了对选中多节点进行复制操作的处理

parent 16c41390
...@@ -101,12 +101,13 @@ define(function(require, exports, module) { ...@@ -101,12 +101,13 @@ define(function(require, exports, module) {
execute: function(km) { execute: function(km) {
if (_clipboardNodes.length) { if (_clipboardNodes.length) {
var node = km.getSelectedNode(); var nodes = km.getSelectedNodes();
if (!node) return; if (!nodes.length) return;
for (var i = 0, ni; for (var i = 0, ni; ni = _clipboardNodes[i]; i++) {
(ni = _clipboardNodes[i]); i++) { for (var j = 0, node; node = nodes[j]; j++) {
appendChildNode(node, ni.clone()); appendChildNode(node, ni.clone());
}
} }
km.select(_selectedNodes, true); km.select(_selectedNodes, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment