visible

Gets or sets the visibility of the element.

Example

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

    var circle = new draw.Circle(new geom.Circle([100, 100], 50), {
        fill: { color: "yellow" }
    });

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

    console.log("Initial visibility:", circle.visible());

    // Hide the element after 2 seconds
    setTimeout(function() {
        circle.visible(false);
        console.log("Visibility after hiding:", circle.visible());
    }, 2000);

    // Show it again after 4 seconds
    setTimeout(function() {
        circle.visible(true);
        console.log("Visibility after showing:", circle.visible());
    }, 4000);
</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