rect
Gets or sets the layout rectangle.
Parameters
rect kendo.geometry.Rect
The layout rectangle.
Returns
kendo.geometry.Rect The current rectangle.
Example
<div id="surface" style="height: 400px;"></div>
<script>
var draw = kendo.drawing;
var Rect = kendo.geometry.Rect;
var Path = draw.Path;
var initialRect = new Rect([200, 0], [200, 200]);
var pathRect = new Rect([0, 0], [100, 100]);
var layout = new draw.Layout(initialRect);
var pathA = Path.fromRect(pathRect);
var pathB = Path.fromRect(pathRect);
layout.append(pathA, pathB);
layout.reflow();
// Get the current rectangle
var currentRect = layout.rect();
console.log("Current rectangle:", currentRect);
// Set a new rectangle
var newRect = new Rect([200, 220], [300, 150]);
layout.rect(newRect);
layout.reflow();
var surface = draw.Surface.create($("#surface"));
surface.draw(layout);
surface.draw(Path.fromRect(currentRect));
surface.draw(Path.fromRect(newRect));
</script>
In this article