gojs 子任務展開按鈕

myDiagram.nodeTemplateMap.add("taskPacakge",
            $$(go.Node, "Spot", nodeStyle(),
                $$(go.Panel, "Auto", //Horizontal  Auto
                    $$(go.Shape, "MultiProcess", {
                            fill: "#CC9966",
                            stroke: null
                        },
                        new go.Binding("figure", "figure")
                    ),
                    $$(go.TextBlock, {
                            font: "bold 14pt Helvetica, Arial, sans-serif",
                            stroke: "black", //lightText
                            margin: 8,
                            maxSize: new go.Size(160, NaN),
                            wrap: go.TextBlock.WrapFit,
                            editable: false,
                        },
                        new go.Binding("text").makeTwoWay()
                    ),
                    $$(go.TextBlock, {
                            font: "bold 14pt Helvetica, Arial, sans-serif",
                            stroke: lightText,
                            margin: 8,
                            maxSize: new go.Size(160, NaN),
                            wrap: go.TextBlock.WrapFit,
                            editable: false,
                        },
                        new go.Binding("text", "Sort").makeTwoWay()
                    ),
                ),
                //                 $$("TreeExpanderButton",{
                //                         alignment: go.Spot.Center, //go.Spot.Center
                //                         // width: 25,
                //                         // height: 25,
                //                         // margin: 8,
                //                     }
                //                 ),

                makePort("T", go.Spot.Top, true, true),
                makePort("L", go.Spot.Left, true, true),
                makePort("R", go.Spot.Right, true, true),
                makePort("B", go.Spot.Bottom, true, true),
            )
        );

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章