Hi,
My code :
<
div
id
=
"diagram"
></
div
>
<
script
>
var dataSource = new kendo.data.HierarchicalDataSource({
data: [{
"name": "Progress",
"items": [
{"name": "Kendo UI",
"items":[
{"name": "TreeList"},
{"name": "Chart"}
]
},
{"name": "NativeScript"}
]
}],
schema: {
model: {
children: "items"
}
}
});
$("#diagram").kendoDiagram({
dataSource: dataSource,
editable : {
tools : [
{ name : "createShape" }
]
},
layout: {
type: "tree",
subtype: "down"
},
shapeDefaults: {
type: "circle",
content: {
template: "#= name #"
},
width: 80,
height: 80,
hover: {
fill: "Orange"
}
},
connectionDefaults: {
stroke: {
color: "#979797",
width: 1
},
type: "polyline",
startCap: "FilledCircle",
endCap: "ArrowEnd"
}
});
When you press add, you can see the error details from the console, how can I solve it?
app.js:35020 Uncaught TypeError: Cannot set property 'element' of undefined
at init.createShape (app.js:35020)
at init.createShape (app.js:35022)
at init.click (app.js:35022)
at init.proxy (app.js:34131)
at init.trigger (app.js:34387)
at init._buttonClick (app.js:34690)
at init.proxy (app.js:34131)
at init.trigger (app.js:34387)
at init._click (app.js:34454)
at HTMLAnchorElement.arguments.length.arguments.<computed>.indexOf.t.<computed>.t.<computed>.options.t.<computed> (app.js:34388)
createShape @ app.js:35020
createShape @ app.js:35022
click @ app.js:35022
proxy @ app.js:34131
trigger @ app.js:34387
_buttonClick @ app.js:34690
proxy @ app.js:34131
trigger @ app.js:34387
_click @ app.js:34454
arguments.length.arguments.<computed>.indexOf.t.<computed>.t.<computed>.options.t.<computed> @ app.js:34388
dispatch @ app.js:28789
elemData.handle @ app.js:28593