Skip to content

Commit

Permalink
fix(SizeObserver): now works with new wslink
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Apr 17, 2024
1 parent f34619b commit 4359f1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vue-components/src/components/TrameSizeObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default {
const elem = ref(null);

function resize() {
const size = elem.value.getBoundingClientRect();
const { x, y, width, height } = elem.value.getBoundingClientRect();
const size = { x, y, width, height };
const pixelRatio = window.devicePixelRatio;
const dpi = 96 * pixelRatio;
const event = { size, pixelRatio, dpi };
Expand Down

0 comments on commit 4359f1c

Please sign in to comment.