Hi,
I am adding a Shape via a drag and drop function. I am looking to also add a default dataItem to the options of this Shape.
$(
"#diagram"
).kendoDropTarget({
drop:
function
(e) {
var
item, pos, transformed;
if
(e.draggable.hint) {
item = e.draggable.hint.data(
"shape"
);
pos = e.draggable.hintOffset;
pos =
new
Point(pos.left, pos.top);
transformed = diagram.documentToModel(pos);
item.x = transformed.x;
item.y = transformed.y;
//Want to add default dataItem or find a better place to add.
diagram.addShape(item);
}
}
});
Here is what my current dataItem look like from other shapes added by Read method. Attached Item.
I want to be able to add this data item like the diagram would normally do but through a drag and drop action. So it can be saved back to the database.
Thanks