Skip to content

Commit

Permalink
release(image-viewer): v0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed May 16, 2024
1 parent 61312b0 commit 84d82bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
},
"image-viewer": {
"react": true,
"version": "0.5.0",
"version": "0.5.1",
"style": true,
"icon": false,
"test": true,
Expand Down
2 changes: 1 addition & 1 deletion src/image-viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "image-viewer",
"version": "0.5.0",
"version": "0.5.1",
"description": "Single image viewer",
"luna": {
"react": true
Expand Down
3 changes: 2 additions & 1 deletion src/image-viewer/react.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CSSProperties, FC, useEffect, useRef } from 'react'
import ImageViewer, { IOptions } from './index'
import each from 'licia/each'
import { useNonInitialEffect } from 'src/share/hooks'

interface IImageViewerProps extends IOptions {
style?: CSSProperties
Expand All @@ -25,7 +26,7 @@ const LunaImageViewer: FC<IImageViewerProps> = (props) => {
}, [])

each(['image', 'zoomOnWheel'], (key: keyof IOptions) => {
useEffect(() => {
useNonInitialEffect(() => {
if (imageViewer.current) {
imageViewer.current.setOption(key, props[key])
}
Expand Down

0 comments on commit 84d82bb

Please sign in to comment.