Closed jenicar closed 9 years ago
I think you have the condition reversed. It should be true
if you want the behaviour and false
if not.
Mm my code below keeps the tooltips when panning or zooming but doesn't update the position. I tried it with one of the examples listed and had the same result (below). If I select the node again the tooltip will readjust but it doesn't work automatically.
If i set cyViewport to be true they disappear.
cy.nodes().filter('[format = "station"]').qtip({
content: "Hi",
position: {
my: 'top center',
at: 'bottom center'
},
style: {
classes: 'qtip-bootstrap',
tip: {
width: 16,
height: 8
}
},
show: {
ready: true // Show the tooltip when ready
},
hide: {
event: 'null',
cyViewport: false
}
})
There are two separate options:
options.position.adjust.cyViewport : When true, updates element qTip position on zoom and pan. Note you'll need your own mechanism to hide out-of-bounds qTips, such as customising the parent container.
options.hide.cyViewport : When true, hides qTips when the viewport is manipulated (i.e. zoom/pan).
Have you set them both?
I had not. options.position.adjust.cyViewport solved it! thank you so much!
When options.hide.cyViewport is false the qtips are still visible on panning/zooming but their positions don't update