From 3f53a447e5e9faf883a0d498baf31496375f5431 Mon Sep 17 00:00:00 2001 From: minjieliu Date: Mon, 10 Jun 2024 22:48:44 +0800 Subject: [PATCH] v1.2.6 --- packages/example/pages/docs/change-log.en-US.mdx | 4 ++++ packages/example/pages/docs/change-log.zh-CN.mdx | 4 ++++ packages/react-photo-view/package.json | 2 +- packages/react-photo-view/src/PhotoBox.tsx | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/example/pages/docs/change-log.en-US.mdx b/packages/example/pages/docs/change-log.en-US.mdx index e1b1f65..b06d6ec 100644 --- a/packages/example/pages/docs/change-log.en-US.mdx +++ b/packages/example/pages/docs/change-log.en-US.mdx @@ -2,6 +2,10 @@ title: Change Log --- +## 1.2.6 + +1. fix: On mobile, the image width and height units are converted in the framework of the rax class + ## 1.2.5 1. fix: Chrome version 125 or later cannot be dragged issue diff --git a/packages/example/pages/docs/change-log.zh-CN.mdx b/packages/example/pages/docs/change-log.zh-CN.mdx index 68558eb..cb40ea4 100644 --- a/packages/example/pages/docs/change-log.zh-CN.mdx +++ b/packages/example/pages/docs/change-log.zh-CN.mdx @@ -2,6 +2,10 @@ title: Change Log --- +## 1.2.6 + +1. fix: 移动端在 rax 类的框架中图片宽高单位被转换问题 + ## 1.2.5 1. fix: Chrome 125 版本以上无法拖动的问题 diff --git a/packages/react-photo-view/package.json b/packages/react-photo-view/package.json index 686bced..0c3e91f 100644 --- a/packages/react-photo-view/package.json +++ b/packages/react-photo-view/package.json @@ -1,6 +1,6 @@ { "name": "react-photo-view", - "version": "1.2.5", + "version": "1.2.6", "description": "An exquisite React photo preview component", "author": "MinJieLiu", "license": "Apache-2.0", diff --git a/packages/react-photo-view/src/PhotoBox.tsx b/packages/react-photo-view/src/PhotoBox.tsx index 760e0ba..7bae4e8 100644 --- a/packages/react-photo-view/src/PhotoBox.tsx +++ b/packages/react-photo-view/src/PhotoBox.tsx @@ -425,8 +425,8 @@ export default function PhotoBox({ onTouchStart: isTouchDevice ? handleTouchStart : undefined, onWheel: handleWheel, style: { - width: currentWidth + 'px', - height: currentHeight + 'px', + width: `${currentWidth}px`, + height: `${currentHeight}px`, opacity, objectFit: easingMode === 4 ? undefined : FIT, transform: rotate ? `rotate(${rotate}deg)` : undefined,