Skip to content

Commit

Permalink
Merge pull request #61 from StatikTUM/feature/iframe
Browse files Browse the repository at this point in the history
Fix slider resize
  • Loading branch information
oberbichler authored Sep 5, 2020
2 parents cbc9740 + 3d67178 commit f7de3ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nfem/visualization/canvas_3d_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,14 +603,16 @@
});
window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener('resize', onWindowResize, false);
function onWindowResize(){
camera.aspect = window.innerWidth / height;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, height);
timestepSlider.setAttribute("style", `width: ${width}px;`);
render();
}
Expand Down

0 comments on commit f7de3ee

Please sign in to comment.