center

Gets the position of the center of the rectangle.

Example

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

// Get center point
var center = rect.center();

console.log("Center x:", center.x); // 25 (10 + 30/2)
console.log("Center y:", center.y); // 40 (20 + 40/2)
</script>

Returns

kendo.geometry.Point The position of the center.

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