2017-11-28 37 views
0

나는 새 노드 편집 노드를 만드는 노드와 나중에에서 텍스트 편집기를 허용하고가져 오기 nodeDataArray 다이어그램에서 GOJS

 window.diagram = 
$(go.Diagram, "myDiagramDiv", 
{ 
    initialContentAlignment: go.Spot.Center, // center Diagram contents 
    "undoManager.isEnabled": true, // enable Ctrl-Z to undo and Ctrl-Y to redo 
}); 
      // the node template describes how each Node should be constructed 
      diagram.nodeTemplate = 
      $(go.Node, "Auto", // the Shape automatically fits around the TextBlock 
      $(go.Shape, "RoundedRectangle", // use this kind of figure for the Shape 
      // bind Shape.fill to Node.data.color 
      new go.Binding("fill", "color")), 
      $(go.TextBlock, 
      { margin: 3 ,// some room around the text 
       editable: true }, // permet de le modifier 
      // bind TextBlock.text to Node.data.key 
      new go.Binding("text", "key")), 
     ); 
      diagram.linkTemplate = 
      $(go.Link, 
      $(go.Shape),       // this is the link shape (the line) 
      $(go.Shape, { toArrow: "Standard" }), // this is an arrowhead 
      $(go.TextBlock,      // this is a Link label 
      new go.Binding("text", "text")) 
     ); 

나는를 얻을 수를 연결하고 , GoJS를 사용하여 다이어그램을 만드는 중이라서 편집 후 심지어 편집 후 nodeDataArray 및 linkDataArray을 받고 어떤 도움 그림 을 편집 한 후

window.diagram.GraphLinksModel.nodeDataArray 

하지만 내가 같은 객체 배열을 얻을저기서 객체?

$(go.TextBlock, 
      { margin: 3 ,// some room around the text 
       editable: true}, 
      // bind TextBlock.text to Node.data.key 
      new go.Binding("text", "key").makeTwoWay()), // makeTwoWayis what i neededd 
     ); 
을 bindging 동안

답변

0

가 나는 기능을 추가해야 대답, 발견