selectArea
Selects all diagram elements within the given rectangle.
Parameters
rect kendo.dataviz.diagram.Rect
The rectangle that determines which elements should be selected.
Example - select items within a rectangle
<button id="selectBtn">Select items</button> - at coordinates {x: 150, y: 80, width: 80, height: 80}
<div id="diagram"></div>
<script>
$("#selectBtn").on("click", function(){
var diagram = $("#diagram").getKendoDiagram();
var rect = new kendo.dataviz.diagram.Rect(150, 80, 80, 80);
diagram.selectArea(rect);
});
$("#diagram").kendoDiagram({
shapes:[
{
id:"1",
content:{
text: "State 1"
},
x: 20,
y: 20
},
{
id:"2",
content: {
text: "State 2"
},
x: 160,
y: 20
},
{
id:"3",
content: {
text: "State 3"
},
x: 160,
y: 160
}
],
connections:[
{
from: "1",
to: "2"
},{
from: "2",
to: "3"
}
]
});
</script>