这是一个使用 konva 库的 html 画布。
var json = ' http://pastebin.com/Qv1HAUmY ' 这是我的 json 数据,
然后在我得到“json”的值之前,所有像这样的项目都被删除了
{
"attrs": {
"stroke": "#666",
"fill": "#ddd",
"radius": 8,
"name": "topLeft anchor",
"draggable": true,
"dragOnTop": false,
"visible": false,
"id": "ResizeAnchor"
},
"className": "Circle"
}, {
"attrs": {
"x": 93,
"stroke": "#666",
"fill": "#ddd",
"radius": 8,
"name": "topRight anchor",
"draggable": true,
"dragOnTop": false,
"visible": false,
"id": "ResizeAnchor"
},
"className": "Circle"
}, {
"attrs": {
"x": 93,
"y": 104,
"stroke": "#666",
"fill": "#ddd",
"radius": 8,
"name": "bottomRight anchor",
"draggable": true,
"dragOnTop": false,
"visible": false,
"id": "ResizeAnchor"
},
"className": "Circle"
}, {
"attrs": {
"y": 104,
"stroke": "#666",
"fill": "#ddd",
"radius": 8,
"name": "bottomLeft anchor",
"draggable": true,
"dragOnTop": false,
"visible": false,
"id": "ResizeAnchor"
},
"className": "Circle"
}
如果可能,我想使用 JavaScript 删除所有锚点。