You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

45 lines
3.1 KiB

根据您提供的数据,以下是整理成 JSON 格式的结果:
[
{"id": "1", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -860, "y": -400}, "content": "四"},
{"id": "2", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -1120, "y": -400}},
{"id": "3", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -680, "y": -310}, "content": "四"},
{"id": "4", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -1040, "y": -170}, "content": "四"},
{"id": "5", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -80, "y": -350}, "content": "四"},
{"id": "6", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -320, "y": -400}, "content": " "},
{"id": "7", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -90, "y": -200}, "content": "@"},
{"id": "8", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": 270, "y": -210}},
{"id": "9", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -860, "y": 120}, "content": "四"},
{"id": "10", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -490, "y": 110}},
{"id": "11", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -1050, "y": 120}, "content": "@"},
{"id": "13", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -300, "y": 130}, "content": "@"},
{"id": "14", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -90, "y": 110}, "content": "四"},
{"id": "15", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": 90, "y": -30}, "content": "四"},
{"id": "16", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": 280, "y": 90}, "content": "@"},
{"id": "17", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": 80, "y": -310}, "content": "四"},
{"id": "18", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": 270, "y": -400}},
{"id": "36", "shape": "er-rect", "class": "x6-cell x6-node", "position": {"x": -680, "y": -120}}
]
这个 JSON 数组包含了每个图形元素的 ID、形状、类、位置以及包含的内容(如果有的话)。位置信息是从 `transform` 属性的 `translate(x, y)` 函数中提取的。
[
{"id": "1", "position": {"x": -900, "y": -260}},
{"id": "2", "position": {"x": -1140, "y": -260}},
{"id": "3", "position": {"x": -680, "y": -260}},
{"id": "4", "position": {"x": -900, "y": -140}},
{"id": "5", "position": {"x": -80, "y": -260}},
{"id": "6", "position": {"x": -280, "y": -260}},
{"id": "7", "position": {"x": -50, "y": -100}},
{"id": "8", "position": {"x": 250, "y": -90}},
{"id": "9", "position": {"x": -650, "y": 10}},
{"id": "10", "position": {"x": -260, "y": 0}},
{"id": "11", "position": {"x": -860, "y": 240}},
{"id": "13", "position": {"x": -120, "y": 280}},
{"id": "14", "position": {"x": -40, "y": 110}},
{"id": "15", "position": {"x": 240, "y": 80}},
{"id": "16", "position": {"x": 240, "y": 280}},
{"id": "17", "position": {"x": 100, "y": -260}},
{"id": "18", "position": {"x": 270, "y": -260}},
{"id": "36", "position": {"x": -440, "y": -105}}
]