import {Template, Container, MainPipe} from './DiagramModel'; import {Point, BackgroundPaniter, ViewTool} from './UIUtils'; import {ContainerRefPoint} from './ContainerRefPoint'; import {Editor, Selection} from './Editor'; /** * 模板编辑器 * @author zhaoyk */ export class TemplateEditor extends Editor { private util: EditUtil; templateData: Template; tmpMainPipe:Array>; currentTmpMainPipe:Array; refPoints: any; currentRefPoint: any; protected initCanvasSize(): Point{ return new Point(2500, 2500); } addListeners(): void { this.canvas.addEventListener('click', event=>{this.onClick(event)}); this.container.addEventListener("mousemove", event=>{this.onMouseMove(event)}); } showData(template?: any): void { this.templateData = (