# Canvas stretch when resizing browser window

**URL:** <https://discourse.vtk.org/t/canvas-stretch-when-resizing-browser-window/13029>\
**Category:** vtk.wasm\
**Created:** [January 8, 2024, 10:00am UTC](https://discourse.vtk.org/t/canvas-stretch-when-resizing-browser-window/13029 "2024-01-08T10:00:08Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)\
**Post date:** [January 10, 2024, 3:09pm UTC](https://discourse.vtk.org/t/canvas-stretch-when-resizing-browser-window/13029/7 "2024-01-10T15:09:28Z")

</div>

Yea, this is a known behavior. VTK forces the window’s dimensions on the canvas. Unfortunately, there isn’t much you can do right now because this event handler is setup inside the interactor in C++ - [vtkWebAssemblyRenderWindowInteractor.cxx#L43](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/UI/vtkWebAssemblyRenderWindowInteractor.cxx#L43)

VTK can provide 2 options:

1. resize the canvas to window dimensions upon browser resize (current behavior)
2. canvas ignores resize events from the browser window. (this is what you need)

---

_[View the full topic](https://discourse.vtk.org/t/canvas-stretch-when-resizing-browser-window/13029)._
