|
@@ -33,6 +33,7 @@ import { uuid } from "./until";
|
|
|
import { SBaseArrow, SBaseEquipment, SBaseExpainEdit, SBasePipeUninTool, SBasePipe } from "./"
|
|
|
import { PTopoParser } from "./../persagy-edit/"
|
|
|
import { SBaseArrowPolyEdit } from './items/SBaseArrowPolyEdit';
|
|
|
+import { SGraphAddListCommand } from '../edit/commands/SGraphAddListCommand';
|
|
|
|
|
|
|
|
|
* big-edit 场景
|
|
@@ -474,8 +475,8 @@ export class SBaseEditScene extends SGraphEditScene {
|
|
|
*/
|
|
|
paste(): void {
|
|
|
const copyList = JSON.parse(JSON.stringify(this.copyString));
|
|
|
- console.log('copyList', copyList)
|
|
|
const parserData = new PTopoParser();
|
|
|
+ const graphItemList: SGraphEdit[] = [];
|
|
|
parserData.parseData(copyList);
|
|
|
parserData.markers.forEach((item: SGraphEdit) => {
|
|
|
item.selectable = true;
|
|
@@ -485,11 +486,22 @@ export class SBaseEditScene extends SGraphEditScene {
|
|
|
item.pos.y += 10 / this.view.scale
|
|
|
}
|
|
|
this.addItem(item);
|
|
|
+ graphItemList.push(item);
|
|
|
});
|
|
|
+ this.addListCommand(graphItemList);
|
|
|
this.view ? this.view.update() : '';
|
|
|
}
|
|
|
|
|
|
|
|
|
+ * 添加多个item命令
|
|
|
+ *
|
|
|
+ * @param itemList 鼠标事件对象
|
|
|
+ */
|
|
|
+ addListCommand(itemList: SGraphEdit[]): void {
|
|
|
+ this.undoStack.push(new SGraphAddListCommand(this, itemList));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
* 图例置顶、置底
|
|
|
*
|
|
|
* @parm type 设置类型
|