setSize

Sets the rectangle size.

Example

<script>
var geom = kendo.geometry;
var rect = new geom.Rect([10, 20], [25, 35]);

console.log("Original size:", rect.size.width, rect.size.height); // 25, 35

// Set new size using Size object
rect.setSize(new geom.Size(40, 50));
console.log("New size:", rect.size.width, rect.size.height); // 40, 50

// Set size using array notation
rect.setSize([60, 70]);
console.log("Final size:", rect.size.width, rect.size.height); // 60, 70
</script>

Parameters

value kendo.geometry.Size|Array

The new rectangle Size or equivalent [width, height] array.

Returns

kendo.geometry.Rect The current rectangle instance.

In this article
setSize
Not finding the help you need?
Contact Support