tachybase_todo/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/components/ViewNode.tsx
sealday ede7ead8b1 chore(version): release v0.21.34 (#1045)
Co-authored-by: sealday <sealday@gmail.com>
Reviewed-on: daoyoucloud/tachybase#1045
2024-05-24 01:06:06 +08:00

23 lines
448 B
TypeScript

import { NodeView } from '@antv/x6';
export class SimpleNodeView extends NodeView {
protected renderMarkup() {
return this.renderJSONMarkup({
tagName: 'rect',
selector: 'body',
});
}
update() {
const attrs = this.cell.getAttrs();
const fill = attrs.hightLight ? '#1890ff' : 'gray';
super.update({
body: {
refWidth: '50px',
refHeight: '100px',
fill: fill,
},
});
}
}