Thank you for advice.
I fixed my code to show contents of model.data, both when copied, and when pasted.
diagram.addDiagramListener("ClipboardChanged", function (e) {
console.log('*** model.data (copy) ***');
console.log(e.diagram.model.toJson());
export const pasteNode = (e: go.InputEvent, obj: go.GraphObject): void => {
e.diagram.commit((d: go.Diagram) => {
d.commandHandler.pasteSelection(
e.diagram.toolManager.contextMenuTool.mouseDownPoint,
);
});
console.log('*** model.data (paste) ***');
console.log(e.diagram.model.toJson());
the outputs are following.
(the first is copied data, and the second is pasted data)
*** model.data (copy) ***’
{
"class": "GraphLinksModel",
"linkKeyProperty": "key",
"nodeDataArray": [
{
"key": "\u5927\u6c17\u6c5a\u67d3?",
"label": "\u5927\u6c17\u6c5a\u67d3?",
"position": "73 43",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u4ef6\u6570\u6bd4\u7387"
]
},
{
"rowName": "\u4f4e\u3044",
"values": [
"0.9"
]
},
{
"rowName": "\u9ad8\u3044",
"values": [
"0.1"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u4f4e\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u9ad8\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u80ba\u304c\u3093?",
"label": "\u80ba\u304c\u3093?",
"position": "148 152",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u306f\u3044,\u4f4e\u3044",
"\u306f\u3044,\u9ad8\u3044",
"\u3044\u3044\u3048,\u4f4e\u3044",
"\u3044\u3044\u3048,\u9ad8\u3044"
]
},
{
"rowName": "\u306f\u3044",
"values": [
"0.03",
"0.05",
"0.001",
"0.02"
]
},
{
"rowName": "\u3044\u3044\u3048",
"values": [
"0.97",
"0.95",
"0.999",
"0.98"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u306f\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u3044\u3044\u3048",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u55ab\u7159\u8005?",
"label": "\u55ab\u7159\u8005?",
"position": "214 42",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u4ef6\u6570\u6bd4\u7387"
]
},
{
"rowName": "\u306f\u3044",
"values": [
"0.3"
]
},
{
"rowName": "\u3044\u3044\u3048",
"values": [
"0.7"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u306f\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u3044\u3044\u3048",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u30ec\u30f3\u30c8\u30b2\u30f3\u691c\u67fb?",
"label": "\u30ec\u30f3\u30c8\u30b2\u30f3\u691c\u67fb?",
"position": "71 242",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u306f\u3044",
"\u3044\u3044\u3048"
]
},
{
"rowName": "\u967d",
"values": [
"0.9",
"0.2"
]
},
{
"rowName": "\u9670",
"values": [
"0.1",
"0.8"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u967d",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u9670",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u547c\u5438\u56f0\u96e3?",
"label": "\u547c\u5438\u56f0\u96e3?",
"position": "221 249",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u306f\u3044",
"\u3044\u3044\u3048"
]
},
{
"rowName": "\u306f\u3044",
"values": [
"0.65",
"0.3"
]
},
{
"rowName": "\u3044\u3044\u3048",
"values": [
"0.35",
"0.7"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u306f\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u3044\u3044\u3048",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
}
],
"linkDataArray": [
{
"from": "\u55ab\u7159\u8005?",
"to": "\u80ba\u304c\u3093?",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -1
},
{
"from": "\u5927\u6c17\u6c5a\u67d3?",
"to": "\u80ba\u304c\u3093?",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -2
},
{
"from": "\u80ba\u304c\u3093?",
"to": "\u30ec\u30f3\u30c8\u30b2\u30f3\u691c\u67fb?",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -3
},
{
"from": "\u80ba\u304c\u3093?",
"to": "\u547c\u5438\u56f0\u96e3?",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -4
}
]
}
*** model.data (paste) ***
{
"class": "GraphLinksModel",
"linkKeyProperty": "key",
"nodeDataArray": [
{
"key": "\u5927\u6c17\u6c5a\u67d3?",
"label": "\u5927\u6c17\u6c5a\u67d3?",
"position": "73 43",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u4ef6\u6570\u6bd4\u7387"
]
},
{
"rowName": "\u4f4e\u3044",
"values": [
"0.9"
]
},
{
"rowName": "\u9ad8\u3044",
"values": [
"0.1"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u4f4e\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u9ad8\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u80ba\u304c\u3093?",
"label": "\u80ba\u304c\u3093?",
"position": "148 152",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u306f\u3044,\u4f4e\u3044",
"\u306f\u3044,\u9ad8\u3044",
"\u3044\u3044\u3048,\u4f4e\u3044",
"\u3044\u3044\u3048,\u9ad8\u3044"
]
},
{
"rowName": "\u306f\u3044",
"values": [
"0.03",
"0.05",
"0.001",
"0.02"
]
},
{
"rowName": "\u3044\u3044\u3048",
"values": [
"0.97",
"0.95",
"0.999",
"0.98"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u306f\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u3044\u3044\u3048",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u55ab\u7159\u8005?",
"label": "\u55ab\u7159\u8005?",
"position": "214 42",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u4ef6\u6570\u6bd4\u7387"
]
},
{
"rowName": "\u306f\u3044",
"values": [
"0.3"
]
},
{
"rowName": "\u3044\u3044\u3048",
"values": [
"0.7"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u306f\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u3044\u3044\u3048",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u30ec\u30f3\u30c8\u30b2\u30f3\u691c\u67fb?",
"label": "\u30ec\u30f3\u30c8\u30b2\u30f3\u691c\u67fb?",
"position": "71 242",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u306f\u3044",
"\u3044\u3044\u3048"
]
},
{
"rowName": "\u967d",
"values": [
"0.9",
"0.2"
]
},
{
"rowName": "\u9670",
"values": [
"0.1",
"0.8"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u967d",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u9670",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u547c\u5438\u56f0\u96e3?",
"label": "\u547c\u5438\u56f0\u96e3?",
"position": "221 249",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u306f\u3044",
"\u3044\u3044\u3048"
]
},
{
"rowName": "\u306f\u3044",
"values": [
"0.65",
"0.3"
]
},
{
"rowName": "\u3044\u3044\u3048",
"values": [
"0.35",
"0.7"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u306f\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u3044\u3044\u3048",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u5927\u6c17\u6c5a\u67d3?(1)",
"label": "\u5927\u6c17\u6c5a\u67d3?(1)",
"position": "73 43",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u4ef6\u6570\u6bd4\u7387"
]
},
{
"rowName": "\u4f4e\u3044",
"values": [
"0.9"
]
},
{
"rowName": "\u9ad8\u3044",
"values": [
"0.1"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u4f4e\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u9ad8\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
},
{
"key": "\u80ba\u304c\u3093?(1)",
"label": "\u80ba\u304c\u3093?(1)",
"position": "148 152",
"size": "120 50",
"isGroup": false,
"style": {
"fillColor": "#00a0a0",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 2,
"font": "14pt MS P Gothic",
"fontColor": "rgba(255, 255, 255, 1)",
"underline": false,
"textAlign": "center"
},
"cptTable": [
{
"rowName": "\u72b6\u614b\u540d",
"values": [
"\u306f\u3044,\u4f4e\u3044",
"\u306f\u3044,\u9ad8\u3044",
"\u3044\u3044\u3048,\u4f4e\u3044",
"\u3044\u3044\u3048,\u9ad8\u3044"
]
},
{
"rowName": "\u306f\u3044",
"values": [
"0.03",
"0.05",
"0.001",
"0.02"
]
},
{
"rowName": "\u3044\u3044\u3048",
"values": [
"0.97",
"0.95",
"0.999",
"0.98"
]
}
],
"bInvalidCpt": false,
"cttTable": [],
"nodeLevels": [
{
"category": "Header"
},
{
"category": "Data",
"level": "\u306f\u3044",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
},
{
"category": "Data",
"level": "\u3044\u3044\u3048",
"prior": 0.5,
"posterior": 0.5,
"fixed": false
}
],
"bSoftEvidence": false,
"nodeScore": {
"?": 0
},
"bExpl": false,
"bShowInferMon": false
}
],
"linkDataArray": [
{
"from": "\u55ab\u7159\u8005?",
"to": "\u80ba\u304c\u3093?",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -1
},
{
"from": "\u5927\u6c17\u6c5a\u67d3?",
"to": "\u80ba\u304c\u3093?",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -2
},
{
"from": "\u80ba\u304c\u3093?",
"to": "\u30ec\u30f3\u30c8\u30b2\u30f3\u691c\u67fb?",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -3
},
{
"from": "\u80ba\u304c\u3093?",
"to": "\u547c\u5438\u56f0\u96e3?",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -4
},
{
"from": "\u5927\u6c17\u6c5a\u67d3?(1)",
"to": "\u80ba\u304c\u3093?(1)",
"style": {
"fillColor": "rgba(2, 20, 47, 1)",
"edgeColor": "rgba(2, 20, 47, 1)",
"edgeWeight": 5,
"font": "Bold 12pt Meiryo",
"fontColor": "rgba(31, 31, 31, 1)",
"underline": false,
"textAlign": "center"
},
"key": -5
}
]
}