Hello,
I'm trying to combine custom positions of shape connectors with the save and load functionality. I've combined the following two examples in the dojo:
https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram/methods/load
Dojo example: https://dojo.telerik.com/oqAloqOY/2
As you can see after loading the saved model the custom connectors are gone. Is there any way to persist them or at least re-apply them after load?
Thanks
Hi, I'm trying to insert a grid in the background of a diagram and have found some suggestions on how to do it, but the problem with these solutions is that when I try to remove a specific element, the other element disappears.
Suggested solution: image in Kendo UI for jQuery | Telerik Forums or Untitled | Kendo UI Dojo (telerik.com)
The problem is this insert
diagram.mainLayer.drawingElement.insertAt(grid, 0)
As far as I understand, this breaks the sequence and removes the previous element.
Does anyone know how to avoid this behavior or another solution to insert grid?
PS: The grid is only needed for positioning.
I have a diagram configured that reads data from an MVC Controller. It displays and works fine. I need to do a long poll and refresh the diagram from the database. I have tried all kinds of things.
Called refresh on the diagram object, called read on the datasource.
What is the proper way to get a Diagram to read the data again and redraw itself.
I am trying to figure out how to format some nodes in my diagram. See attached dojo. https://dojo.telerik.com/ASinArEh
I would like:
It seems like my visual template needs to create the circles, then possibly go back and add groups to the diagram then include the existing circles in the new groups, but I haven't figured out a way to do that yet
.Model(m =>
{
m.Id(c => c.WorkflowTypeEventID);
m.Field(c => c.WorkflowTypeEventID).Editable(
false
);
m.Field(c => c.Name).Editable(
true
);
m.Field(c => c.Description).Editable(
true
);
m.Field(c => c.SortOrder).Editable(
false
);
m.Field(c => c.EventType).Editable(
false
);
//m.Field(c => c.WorkflowTypeStateID).Editable(false);
//m.Field(c => c.NextWorkflowTypeStateID).Editable(false);
m.From(c => c.WorkflowTypeStateID);
m.To(c => c.NextWorkflowTypeStateID);
})
When I uncomment out the two lines both items are hidden when editing the connection but they do not pass the values to the Create method. If I comment them both out and create a connection it will pass both values to the models Create method.
I am looking to hide both on edit but still send the values to the controller.
Thanks
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
Hi,
Just wondering if there is a way to specify the sequence of the shapes in the diagram when I add shapes to the diagram via datasource and connectionSource.
the example 1 is
http://dojo.telerik.com/aQUPE
I am trying to get the s1 above the s2 and s2 above s3, but the result is s3 above s2 and s2 above s1.
the example 2 is
http://dojo.telerik.com/EfUPu
I am still trying to add s1 above s2 and s2 above s3. In the next level , I am trying to have s4 above s5
Please could you let me how specify the order of the space in the diagram if it can be done? I am using layout - layered and right.
If not, could you let me know the logic of setting up the shapes' positions behide the diagram