You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a graph display which needs to switch between a view on a page and a full-screen rendering. To this end I have two divs, one in the normal page flow and one for the full screen view. I am using the following code to switch between them:
JavaScript:
function showFullMap() {
$('#mapContainer').hide();
$('#mapContainerFull').show();
switchToRenderer('sigma-container-full');
}
function hideFullMap() {
$('#mapContainer').show();
$('#mapContainerFull').hide();
switchToRenderer('sigma-container');
}
function switchToRenderer(container) {
var s = sigma.instances[0];
for(i in s.renderers) {
s.renderers[i].clear();
s.killRenderer(i);
}
s.addRenderer(container);
s.refresh();
}
After three full-screen switches the map begins to render incorrectly, it appears to be zoomed in to 50% height and width. Each successive switch after this causes a further zoom. Is this a bug or a problem with my code? If the latter can you suggest a better method?
The text was updated successfully, but these errors were encountered:
I have had exactly the same issue for the past few days and have been trying to figure out what is going on but have been unable to. I've tried killing the instance and starting a new one, I've tried killing the graph and I've tried killing the renderer and adding a new one....haven't been able to solve it yet.
OK. The killRenderer method actually destroys everything that links the renderer to the sigma instance, but the kill methods of the renderers do not exist yet, so the contexts and every references are still on, which explains the weird behaviour you met. I fix it as soon as I can.
I have a graph display which needs to switch between a view on a page and a full-screen rendering. To this end I have two divs, one in the normal page flow and one for the full screen view. I am using the following code to switch between them:
JavaScript:
HTML:
After three full-screen switches the map begins to render incorrectly, it appears to be zoomed in to 50% height and width. Each successive switch after this causes a further zoom. Is this a bug or a problem with my code? If the latter can you suggest a better method?
The text was updated successfully, but these errors were encountered: