Skip to content

Commit

Permalink
chore: add correct path to be used both on live or static
Browse files Browse the repository at this point in the history
  • Loading branch information
basilgood committed Jul 29, 2024
1 parent 71297d7 commit eb1188c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
14 changes: 10 additions & 4 deletions stories/cosmoz-image-viewer.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export const Basic = ({
?loop=${loop}
?show-zoom=${showZoom}
?detached-show-zoom=${detachedShowZoom}
.images=${['stories/images/cosmos1.jpg', 'stories/images/cosmos2.jpg']}
.images=${[
'../stories/images/cosmos1.jpg',
'../stories/images/cosmos2.jpg',
]}
></cosmoz-image-viewer>
`;

Expand All @@ -52,10 +55,13 @@ Basic.args = {

export const Issue21 = () => {
const images1 = [
'stories/images/stockholm.jpg',
'stories/images/strasbourg.jpg',
'../stories/images/stockholm.jpg',
'../stories/images/strasbourg.jpg',
],
images2 = ['stories/images/cosmos1.jpg', 'stories/images/cosmos2.jpg'];
images2 = [
'../stories/images/cosmos1.jpg',
'../stories/images/cosmos2.jpg',
];
return html`
<cosmoz-image-viewer
show-detach
Expand Down
6 changes: 3 additions & 3 deletions stories/data.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const images = [
'stories/images/stockholm.jpg',
'../stories/images/stockholm.jpg',
'this-is-a-loading-error.jpg',
() => 'stories/images/a_size.png',
() => '../stories/images/a_size.png',
() =>
new Promise((resolve) =>
setTimeout(() => resolve('stories/images/strasbourg.jpg'), 500),
setTimeout(() => resolve('../stories/images/strasbourg.jpg'), 500),
),
];
2 changes: 1 addition & 1 deletion stories/haunted-pan-zoom.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
};
const Template = ({ disabled, height, zoomStiffness, panStiffness }) => html`
<haunted-pan-zoom
src="stories/images/a_size.png"
src="../stories/images/a_size.png"
style="height: ${height}px;"
?disabled=${disabled}
.zoomStiffness=${zoomStiffness}
Expand Down

0 comments on commit eb1188c

Please sign in to comment.