物管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

51 lines
893 B

// 自定义辅助分组,用来创建虚拟节点,作为自由画线的开始和结束点
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,
}