This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
Flow registerNode 中添加的rect、circle等无法设置fill、stroke属性 #107
Comments
ArronYR
changed the title
Flow registerNode 中添加的react、circle等无法设置fill、stroke属性
Flow registerNode 中添加的rect、circle等无法设置fill、stroke属性
Mar 26, 2019
this.stroke_color_type改为this.cfg.stroke_color_type |
我是按照官方的demo弄的 按照你以上的方法,出现以下错误 |
sorry,改为this.get('stroke_color_type')试一下 |
在g6-editor中硬编码了节点的actived, selected样式,拖拽添加节点后,鼠标悬停在节点上,触发了默认样式。可以重写这几个样式。如下: Flow.registerNode('model-card', {
draw(item) {
},
getDefaulStyle: function() {
return {
stroke: "#1880b4",
fill: "#265572",
shadowOffsetX: 0,
shadowOffsetY: 4,
shadowBlur: 10,
shadowColor: "rgba(13, 26, 38, 0.08)",
lineWidth: 1,
radius: 4,
fillOpacity: .92
}
},
getDefaulActivedStyle: function() {
return {
stroke: "#1880b4",
lineWidth: 1
}
},
getDefaulSelectedtyle: function() {
return {
stroke: "#1880b4",
lineWidth: 2
}
},
// 设置锚点
anchor: [
[0.5, 1], // 下边边的中点
],
}); |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
g6-editor 版本:1.2.0
设置左侧item的data-shape为对应的类型
但在canvas上显示的图形并没有设置上对应的颜色。
The text was updated successfully, but these errors were encountered: