Files
x_admin/admin/src/components/flow/flowEdit/node/basic/RectNode.js
2023-12-11 14:02:03 +08:00

29 lines
640 B
JavaScript

import { RectResize } from '@logicflow/extension'
import { getShapeStyleFuction, getTextStyleFunction } from '../getShapeStyleUtil'
// 矩形
class RectNewModel extends RectResize.model {
setToBottom () {
this.zIndex = 0
}
getNodeStyle () {
const style = super.getNodeStyle()
const properties = this.getProperties()
return getShapeStyleFuction(style, properties)
}
getTextStyle () {
const style = super.getTextStyle()
const properties = this.getProperties()
return getTextStyleFunction(style, properties)
}
}
export default {
type: 'pro-rect',
view: RectResize.view,
model: RectNewModel
}