mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-06 16:47:06 +08:00
29 lines
640 B
JavaScript
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
|
|
}
|