visible
Gets or sets the visibility of the current element.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
connections: [{
from: { x: 100, y: 150 },
to: { x: 300, y: 150 }
}]
});
var diagram = $("#diagram").getKendoDiagram();
var connection = diagram.connections[0];
// Get current visibility
var isVisible = connection.visible();
console.log("Is visible:", isVisible);
// Hide the connection
connection.visible(false);
// Show the connection again
setTimeout(function() {
connection.visible(true);
}, 2000);
</script>
Parameters
visible Boolean
The new visibility state.
Returns
Boolean
True if the element is visible, false otherwise.
In this article