visible

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

Example

<div id="surface" style="width: 250px; height: 250px;"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    var rect = new geom.Rect([10, 10], [200, 150]);
    var image = new draw.Image("https://demos.telerik.com/kendo-ui/content/web/editor/tenerife.png", rect);
    
    console.log("Initial visibility:", image.visible()); // Default is true
    
    var surface = draw.Surface.create($("#surface"));
    surface.draw(image);
    
    setTimeout(function() {
        image.visible(false);
        console.log("Visibility after hiding:", image.visible());
    }, 1000);
    
    setTimeout(function() {
        image.visible(true);
        console.log("Visibility after showing:", image.visible());
    }, 2000);
</script>

Parameters

visible Boolean

A flag indicating if the element should be visible.

Returns

Boolean true if the element is visible; false otherwise.

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