2017-01-16 36 views
0

是否可以在JoinJS中以編程方式顯示端口?這是我想要做的。在JointJs中動態顯示端口

  • 使用RappidJs。
  • 想在模具中不顯示端口。
  • 將單元格放在紙上後顯示端口。

我看到API爲addPort和removePort,但沒有看到隱藏/顯示周圍的任何東西。

+0

我試過以下,但沒有效果。 cell.attr({ 」 .joint端口 ':{ 顯示: '無', 能見度: '隱藏' }, ' .inPorts ':{ 顯示: '無' }, ' .outPorts ':{ display:'none' } }); –

回答

1

請嘗試將端口不透明屬性設置爲僅在放入紙張後顯示端口。

 attrs: { 
       '.port-body': { 
        opacity: 1 // or 0 
       }