setWidth

Sets the width to a new value.

Parameters

value Number

The new width value.

Returns

kendo.geometry.Size The current Size instance.

Example

<script>
var geom = kendo.geometry;
var size = new geom.Size(100, 50);

size.setWidth(200);
console.log(size.width); // logs 200
console.log(size.getWidth()); // logs 200

// Method chaining is possible
var newSize = size.setWidth(300).setHeight(150);
console.log(newSize.width); // logs 300
console.log(newSize.height); // logs 150
</script>
In this article
setWidth
Not finding the help you need?
Contact Support