I am new to Cytoscape.js. I've managed to create a network. I'd like to change mouse cursor to pointer when mouse is over a node. Based on what I read, I should use the following code:
style: cytoscape.stylesheet()
.selector('node')
.css({
'content': 'data(name)',
'text-valign': 'center',
'color': 'white',
'text-outline-width': 2,
'text-outline-color': '#888',
'cursor': 'pointer'
})
//other code omitted
To my surprise, the cursor did not change. It stayed the same default cursor. What did I miss? Please help. Thanks.
This worked for me :
cy.on('mouseover', 'node', function (evt) {
$('html,body').css('cursor', 'pointer');
} );
cy.on('mouseout', 'node', function (evt) {
$('html,body').css('cursor', 'default');
});
Due to technical issues with the cursor across browsers and the fact that the cursor does not apply at all on touch devices, Cy.js no longer supports the cursor
property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With