Reputation: 251
In a vue.js with vuetify SPA I would like to determine what is the maximum size that my webassembly application can occupy. I need to give exact width and height coordinates to the wasm app and I would like to embedd it between a v-toolbar and a v-footer.
I could get the overall window size and substract a hard coded value (compensating for the toolbar and the footer), but the most elegant solution would be to determine the maximum size available for the component.
Upvotes: 0
Views: 488
Reputation: 1756
There isn't an event that would be fired by Vue necessarily, but the ResizeObserver browser API might be useful to you. (Here's a better explanation than the docs.) You can set it up to watch for the resize of your WASM app's containing element.
Upvotes: 1