[O] Use separate div to detect width
This commit is contained in:
+9
-2
@@ -11,9 +11,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="artwork-container" ref="artworkContainer">
|
<div id="width-detector" ref="widthDetect"></div>
|
||||||
|
|
||||||
|
<div id="artwork-container">
|
||||||
<el-card class="artwork clickable" :body-style="{padding: '0px',
|
<el-card class="artwork clickable" :body-style="{padding: '0px',
|
||||||
width: responsive.getBlockWidth($refs.artworkContainer.clientWidth).toFixed(0) + 'px'}"
|
width: responsive.getBlockWidth($refs.widthDetect.clientWidth).toFixed(0) + 'px'}"
|
||||||
v-for="(artwork, i) in selectedArtworks" :key="artwork.date + artwork.title">
|
v-for="(artwork, i) in selectedArtworks" :key="artwork.date + artwork.title">
|
||||||
<div class="image" :style="{'background-image': `url(${artwork.imgThumb})`}"
|
<div class="image" :style="{'background-image': `url(${artwork.imgThumb})`}"
|
||||||
@click="onImageClick(artwork, i)">
|
@click="onImageClick(artwork, i)">
|
||||||
@@ -101,6 +103,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#width-detector
|
||||||
|
{
|
||||||
|
max-width: 1400px;
|
||||||
|
}
|
||||||
|
|
||||||
#artwork-container
|
#artwork-container
|
||||||
{
|
{
|
||||||
// Center
|
// Center
|
||||||
|
|||||||
Reference in New Issue
Block a user