myDiagram.nodeTemplateMap.add("decision",
$(go.Node, "Auto",
new go.Binding("text", "text"),
// define the node's outer shape, which will surround the Horizontal Panel
$(go.Shape, "Rectangle",
{ fill: "yellow", stroke: "lightgray" }),
// define a horizontal Panel to place the node's text alongside the buttons
$(go.Panel, "Horizontal",
$(go.TextBlock,
{ editable: true, font: "15px Roboto, sans-serif", margin: 5, textValidation: okName},
//textValidation: okAnswer},
function okName(textblock, oldstr, newstr) {
return true;
};
Je me demande comment obtenir le newstr en dehors de la fonction OkName? Je veux recueillir tous les newstr.comment obtenir le modèle mis à jour après le changement de diagramme?
Merci!
Améliorer le formatage –