resize

Adjusts the widget layout to match the size of the container.

Example

<div id="barcode" style="width: 300px; height: 150px;"></div>
<script>
$("#barcode").kendoBarcode({
  value: "FOO"
});

$("#barcode")
   .css("width", "600px")
   .data("kendoBarcode").resize();
</script>

Important If a fixed width is set using the width option, the resize method will not adjust the widget to match the size of the container. In this case, update both the container's width and the widget's width to the appropriate value.

Example

<div id="barcode" style="width: 300px; height: 150px;"></div>
<script>
$("#barcode").kendoBarcode({
  value: "FOO",
  width: 300
});

$("#barcode").css("width", "600px");
var barcode = $("#barcode").data("kendoBarcode");
barcode.setOptions({ width: 600 });
barcode.resize();
</script>

Parameters

force Boolean optional

Defines whether the widget should proceed with resizing even if the element dimensions have not changed.

In this article
Not finding the help you need?