@@ -70,7 +77,7 @@ function handleSliderInput(event: Event) {
position: relative;
display: grid;
width: 100%;
- height: 400px;
+ // height: 400px;
max-width: 1160px;
place-content: center;
position: relative;
@@ -79,14 +86,13 @@ function handleSliderInput(event: Event) {
.image-container {
width: 100%;
max-width: 1160px;
- max-height: 90vh;
+ // max-height: 90vh;
overflow: hidden;
- aspect-ratio: 2/1;
+ // aspect-ratio: 2/1;
:deep(img) {
display: block;
max-width: 100%;
-
}
}
}
@@ -116,7 +122,7 @@ function handleSliderInput(event: Event) {
resize: horizontal;
width: 100%;
height: 100%;
- object-fit: cover;
+ // object-fit: cover;
object-position: center;
}
diff --git a/packages/vue-component-library/src/stories/ImageSlider.stories.js b/packages/vue-component-library/src/stories/ImageSlider.stories.js
index 89e3e2d59..24b51d9bd 100644
--- a/packages/vue-component-library/src/stories/ImageSlider.stories.js
+++ b/packages/vue-component-library/src/stories/ImageSlider.stories.js
@@ -57,6 +57,78 @@ export function Default() {
}
}
+const mockSquareImage = [
+ {
+ id: '3280520',
+ src: 'https://static.library.ucla.edu/craftassetstest/_fullscreen/lostlake.jpeg',
+ height: 1500,
+ width: 1500,
+ srcset: 'https://static.library.ucla.edu/craftassetstest/_fullscreen/lostlake.jpeg',
+ alt: 'Lostlake',
+ focalPoint: [
+ 0.5,
+ 0.5
+ ]
+ }
+]
+
+const mockSquareImageCarousel = [{
+ id: '37072',
+ caption: 'Before and After Image Slider caption #1',
+ beforeImage: mockSquareImage[0],
+ afterImage: mockSquareImage[0]
+}]
+
+const mockTallImage = [
+ {
+ id: '3280520',
+ src: 'https://static.library.ucla.edu/craftassetstest/FTVA/film-reel_4_18.jpg',
+ height: 350,
+ width: 250,
+ srcset: 'https://static.library.ucla.edu/craftassetstest/FTVA/_375xAUTO_crop_center-center_none/film-reel_4_18.jpg 375w, https://static.library.ucla.edu/craftassetstest/FTVA/_960xAUTO_crop_center-center_none/film-reel_4_18.jpg 960w, https://static.library.ucla.edu/craftassetstest/FTVA/_1280xAUTO_crop_center-center_none/film-reel_4_18.jpg 1280w, https://static.library.ucla.edu/craftassetstest/FTVA/_1920xAUTO_crop_center-center_none/film-reel_4_18.jpg 1920w, https://static.library.ucla.edu/craftassetstest/FTVA/_2560xAUTO_crop_center-center_none/film-reel_4_18.jpg 2560w',
+ alt: 'Lostlake',
+ focalPoint: [
+ 0.5,
+ 0.5
+ ]
+ }
+]
+
+const mockTallImageCarousel = [{
+ id: '37072',
+ caption: 'Before and After Image Slider caption #1',
+ beforeImage: mockTallImage[0],
+ afterImage: mockTallImage[0]
+}]
+
+export function TallImage() {
+ return {
+ data() {
+ return {
+ ...mockTallImageCarousel[0],
+ }
+ },
+ components: { ImageSlider },
+ template: `
+
+.before-image {
+ filter: grayscale(100%)
+}
+
+
+
+
+ {{ caption }}
+
+
+
+ `,
+ }
+}
+
export function WithCustomLabels() {
return {
data() {
@@ -92,7 +164,9 @@ export function WithScrollWrapperCarousel() {
return {
data() {
return {
- ...mockBeforeAfterImageCarousel[0],
+ firstImage: mockBeforeAfterImageCarousel[0],
+ secondImage: mockTallImageCarousel[0],
+ thirdImage: mockSquareImageCarousel[0],
}
},
components: { ImageSlider, ScrollWrapper },
@@ -106,20 +180,27 @@ export function WithScrollWrapperCarousel() {
+ :before-image="firstImage.beforeImage"
+ :after-image="firstImage.afterImage"
+ >
+
+ Custom Before Label
+
+
+ Custom After Label
+
+