Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 6972

myDiagram.nodeTemplateMap.add

$
0
0

@Jane wrote:

http://gojs.net/latest/samples/logicCircuit.html

 // add the templates created above to myDiagram and palette
  myDiagram.nodeTemplateMap.add("input", inputTemplate);
  myDiagram.nodeTemplateMap.add("output", outputTemplate);
  myDiagram.nodeTemplateMap.add("and", andTemplate);
  myDiagram.nodeTemplateMap.add("or", orTemplate);
  myDiagram.nodeTemplateMap.add("xor", xorTemplate);
  myDiagram.nodeTemplateMap.add("not", notTemplate);
  myDiagram.nodeTemplateMap.add("nand", nandTemplate);
  myDiagram.nodeTemplateMap.add("nor", norTemplate);
  myDiagram.nodeTemplateMap.add("xnor", xnorTemplate);
  palette.model.nodeDataArray = [
    { category: "input" },
    { category: "output" },
    { category: "and" },
    { category: "or" },
    { category: "xor" },
    { category: "not" },
    { category: "nand" },
    { category: "nor" },
    { category: "xnor" }
  ];

Where is the introduce of add method?I can use the id of each Node to add the templates created above to myDiagram and palette?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6972

Trending Articles