Skip to content

Commit cac3860

Browse files
committed
fix: [meteor] Q-layout issue with padding and height quasarframework#1431
1 parent 0b84d8c commit cac3860

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

src/components/observables/QResizeObservable.vue

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<template>
2-
<div class="absolute-full overflow-hidden invisible" style="z-index: -1">
2+
<div :style="absoluteFull" style="z-index: -1">
33
<div
44
ref="expand"
5-
class="absolute-full overflow-hidden invisible"
5+
:style="absoluteFull"
66
@scroll="onResize"
77
>
8-
<div ref="expandChild" class="absolute-top-left transition-0" style="width: 100000px; height: 100000px;"></div>
8+
<div ref="expandChild" :style="absoluteTop" style="width: 100000px; height: 100000px;"></div>
99
</div>
1010
<div
1111
ref="shrink"
12-
class="absolute-full overflow-hidden invisible"
12+
:style="absoluteFull"
1313
@scroll="onResize"
1414
>
15-
<div class="absolute-top-left transition-0" style="width: 200%; height: 200%;"></div>
15+
<div :style="absoluteTop" style="width: 200%; height: 200%;"></div>
1616
</div>
1717
</div>
1818
</template>
@@ -27,6 +27,23 @@ function getSize (el) {
2727
2828
export default {
2929
name: 'q-resize-observable',
30+
data: () => ({
31+
absoluteFull: {
32+
position: 'absolute',
33+
top: 0,
34+
left: 0,
35+
right: 0,
36+
bottom: 0,
37+
overflow: 'hidden',
38+
visibility: 'hidden'
39+
},
40+
absoluteTop: {
41+
position: 'absolute',
42+
top: 0,
43+
left: 0,
44+
transition: '0s'
45+
}
46+
}),
3047
methods: {
3148
onResize () {
3249
const size = getSize(this.$el.parentNode)

0 commit comments

Comments
 (0)