我有一个用jsPlumb动态生成的流程图。我将其保存到MySQL数据库,我需要一个没有任何编辑功能的视图。
我知道如何删除所有部分以使其不可编辑,但始终显示连接点(左,右,上,下)
我怎样才能使它们不可见,这样我就可以看到没有连接点的连接器/箭头?
sourceEndpoint = {
endpoint:["Rectangle",{ width:1, height:1}],
paintStyle:{
fillStyle:"#db0013",
},
maxConnections:999,
isSource:false,
isTarget:false,
connector:[ "Flowchart", { stub:[10, 25], gap:0, cornerRadius:0, alwaysRespectStubs:false } ],
connectorStyle:connectorPaintStyle,
hoverPaintStyle:endpointHoverStyle,
connectorHoverStyle:connectorHoverStyle,
dragOptions:{}
},
宽度和高度= 1的矩形使其很小,但仍然可见,如何使它不可见?:)
如此fa
Q
还有两种方法:
使用空白的端点类型。它不会绘制用户可见的任何内容。
将CSSClass添加到sourceEndpoint选项
sourceEndpoint = {
... other options ...
cssClass: 'source-endpoint'
}
和CSS样式
.source-endpoint svg * {
fill: transparent;
stroke: transparent;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句