visible
Gets or sets the visibility of the element. Inherited from Element.visible
Example
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var arcGeometry = new geom.Arc([100, 100], {
radiusX: 25,
radiusY: 25,
startAngle: 0,
endAngle: 270
});
var arc = new draw.Arc(arcGeometry).stroke("teal", 3);
var surface = draw.Surface.create($("#surface"));
surface.draw(arc);
// Get current visibility
console.log("Is visible:", arc.visible());
// Hide the arc after 2 seconds
setTimeout(() => {
arc.visible(false);
console.log("Arc hidden, visible:", arc.visible());
}, 2000);
// Show the arc again after 4 seconds
setTimeout(() => {
arc.visible(true);
console.log("Arc shown, visible:", arc.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