Commit 4c26306c authored by hy's avatar hy

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

parent 16c41390
......@@ -101,12 +101,13 @@ define(function(require, exports, module) {
execute: function(km) {
if (_clipboardNodes.length) {
var node = km.getSelectedNode();
if (!node) return;
var nodes = km.getSelectedNodes();
if (!nodes.length) return;
for (var i = 0, ni;
(ni = _clipboardNodes[i]); i++) {
appendChildNode(node, ni.clone());
for (var i = 0, ni; ni = _clipboardNodes[i]; i++) {
for (var j = 0, node; node = nodes[j]; j++) {
appendChildNode(node, ni.clone());
}
}
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