visible

Gets or sets the visibility of the element. Inherited from Element.visible

Parameters

visible Boolean

A flag indicating if the element should be visible.

Returns

Boolean true if the element is visible; false otherwise.

Example

<div id="surface"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    var rectGeometry = new geom.Rect([0, 0], [100, 100]);
    var rect = new draw.Rect(rectGeometry).fill("magenta");

    // Set visibility
    rect.visible(true);

    // Get current visibility
    var isVisible = rect.visible();
    console.log("Is visible:", isVisible);

    var surface = draw.Surface.create($("#surface"));
    surface.draw(rect);

    // Toggle visibility after 2 seconds
    setTimeout(function() {
        rect.visible(!rect.visible());
    }, 2000);
</script>
In this article
visible
Not finding the help you need?
Contact Support