Skip to content

Commit

Permalink
- Fix border style of snap zoom bar
Browse files Browse the repository at this point in the history
- Fix style of react-iv-viewer
  • Loading branch information
s-yadav committed Aug 15, 2024
1 parent 4bec94e commit ded5af4
Show file tree
Hide file tree
Showing 12 changed files with 4,649 additions and 142 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "yarn build-core && yarn build-react"
},
"devDependencies": {
"@parcel/transformer-sass": "2.12.0",
"all-contributors-cli": "^6.26.1"
}
}
4 changes: 2 additions & 2 deletions packages/iv-viewer/dist/iv-viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
.iv-snap-handle {
box-sizing: border-box;
position: absolute;
border: 1px solid #fff;
border: 1px solid #aaa;
transform: translate3d(0, 0, 0);
box-shadow: 0 0 0 200px rgba(0, 0, 0, 0.5);
cursor: pointer;
Expand All @@ -103,7 +103,7 @@
top: 150px;
left: -1px;
height: 20px;
border: 1px solid #fff;
border: 1px solid #aaa;
border-top: 0;
background: rgba(0, 0, 0, 0.3);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/iv-viewer/dist/iv-viewer.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 17 additions & 8 deletions packages/iv-viewer/example/container-mode/example.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
import ImageViewer from '../../src/ImageViewer';
import image1 from '../images/1.jpg';
import image1Big from '../images/1_big.jpg';
import image2 from '../images/2.jpg';
import image2Big from '../images/2_big.jpg';
import image3 from '../images/3.jpg';
import image3Big from '../images/3_big.jpg';
import image4 from '../images/4.jpg';
import image4Big from '../images/4_big.jpg';


const images = [{
small: '../images/1.jpg',
big: '../images/1_big.jpg',
small: image1,
big: image1Big,
}, {
small: '../images/2.jpg',
big: '../images/2_big.jpg',
small: image2,
big: image2Big,
}, {
small: '../images/3.jpg',
big: '../images/3_big.jpg',
small: image3,
big: image3Big,
}, {
small: '../images/4.jpg',
big: '../images/4_big.jpg',
small: image4,
big: image4Big,
}];

let curImageIdx = 1;
Expand Down
4 changes: 2 additions & 2 deletions packages/iv-viewer/lib/iv-viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
.iv-snap-handle {
box-sizing: border-box;
position: absolute;
border: 1px solid #fff;
border: 1px solid #aaa;
transform: translate3d(0, 0, 0);
box-shadow: 0 0 0 200px rgba(0, 0, 0, 0.5);
cursor: pointer;
Expand All @@ -103,7 +103,7 @@
top: 150px;
left: -1px;
height: 20px;
border: 1px solid #fff;
border: 1px solid #aaa;
border-top: 0;
background: rgba(0, 0, 0, 0.3);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/iv-viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iv-viewer",
"version": "2.2.0",
"version": "2.2.1",
"description": "A zooming and panning plugin inspired by google photos for your web images.",
"main": "lib/index.js",
"repository": {
Expand All @@ -21,7 +21,7 @@
},
"homepage": "https://github.com/s-yadav/iv-viewer#readme",
"scripts": {
"start": "yarn copy-assets & parcel example/index.html --out-dir temp",
"start": "yarn copy-assets & parcel example/index.html",
"copy-assets": "cp -R example/ temp",
"bundle": "cross-env yarn compile && yarn build-css && yarn bundle-dist",
"bundle-dist": "cross-env rollup -c rollup.config.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/iv-viewer/src/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $iv-snap-view-on-left: true !default;
$iv-zoom-slider-height: 20px !default;
$iv-zoom-handle-height: $iv-zoom-slider-height !default;
$iv-zoom-handle-width: 20px !default;
$iv-zoom-handle-border: 1px solid $iv-handle-color !default;
$iv-zoom-handle-border: 1px solid $iv-light-gray !default;
$iv-zoom-button-width: 24px !default;
$iv-zoom-button-icon-height: 2px !default;
$iv-zoom-button-icon-width: 10px !default;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-iv-viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-iv-viewer",
"version": "1.0.0",
"version": "1.0.1",
"author": "manav",
"module": "dist/react-iv-viewer.esm.js",
"size-limit": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import { FullScreenViewer } from '../FullScreenViewer';
import '../../dist/react-iv-viewer.css';
import image1 from './assets/img.jpg';
import image2 from './assets/hiResImg.jpg';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import { ImageViewer } from '../ImageViewer';
import '../../dist/react-iv-viewer.css';
import image1 from './assets/img.jpg';
import image2 from './assets/hiResImg.jpg';

Expand Down
4 changes: 2 additions & 2 deletions packages/react-iv-viewer/src/style.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@import '~iv-viewer/src/scss/build.scss';
$react-container-max-height: 300px;
$react-container-min-height: 300px;
.iv {
&-container {
max-height: $react-container-max-height;
min-height: $react-container-min-height;
background-color: black;
}
}
Loading

0 comments on commit ded5af4

Please sign in to comment.