// 自定义辅助分组,用来创建虚拟节点,作为自由画线的开始和结束点 const { EllipseResize } = window class HelperCirclePointModel extends EllipseResize.model { initNodeData(data) { super.initNodeData(data) this.rx = 5 this.ry = 5 this.virtual = true this.draggable = false } setToBottom() { this.zIndex = 0 } getNodeStyle() { const style = super.getNodeStyle() style.fill = 'transparent' style.stroke = 'transparent' return style } getDefaultAnchor() { const { id, x, y, width, height, } = this const anchors = [ { x, y, width: 2, height: 2, id, type: 'right', }, ] return anchors } } export default { type: 'helper-circle-point', model: HelperCirclePointModel, view: EllipseResize.view, }