react-photo-view
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -6,2 +6,3 @@ import React from 'react'; | ||
loaded: boolean; | ||
broken: boolean; | ||
width: number; | ||
@@ -8,0 +9,0 @@ height: number; |
@@ -20,3 +20,2 @@ import React from 'react'; | ||
originRect?: OriginRectType; | ||
onShowAnimateEnd?: () => void; | ||
} | ||
@@ -29,2 +28,3 @@ declare const initialState: { | ||
loaded: boolean; | ||
broken: boolean; | ||
x: number; | ||
@@ -39,2 +39,4 @@ y: number; | ||
lastY: number; | ||
lastMoveClientX: number; | ||
lastMoveClientY: number; | ||
touchedTime: number; | ||
@@ -52,2 +54,3 @@ lastTouchLength: number; | ||
loaded: boolean; | ||
broken: boolean; | ||
x: number; | ||
@@ -62,2 +65,4 @@ y: number; | ||
lastY: number; | ||
lastMoveClientX: number; | ||
lastMoveClientY: number; | ||
touchedTime: number; | ||
@@ -64,0 +69,0 @@ lastTouchLength: number; |
@@ -20,2 +20,3 @@ import { CloseEdgeEnum, ReachTypeEnum, TouchStartEnum } from '../types'; | ||
* 获取接触边缘类型 | ||
* @param initialTouchState | ||
* @param horizontalCloseEdge | ||
@@ -25,3 +26,4 @@ * @param verticalCloseEdge | ||
*/ | ||
export declare function getReachType({ horizontalCloseEdge, verticalCloseEdge, reachState, }: { | ||
export declare function getReachType({ initialTouchState, horizontalCloseEdge, verticalCloseEdge, reachState, }: { | ||
initialTouchState: TouchStartEnum; | ||
horizontalCloseEdge: CloseEdgeEnum; | ||
@@ -31,21 +33,1 @@ verticalCloseEdge: CloseEdgeEnum; | ||
}): ReachTypeEnum; | ||
/** | ||
* 边缘超出状态 | ||
* @param initialTouchState | ||
* @param planX | ||
* @param planY | ||
* @param scale | ||
* @param width | ||
* @param height | ||
*/ | ||
export declare function getCloseEdgeResult({ initialTouchState, planX, planY, scale, width, height, }: { | ||
initialTouchState: TouchStartEnum; | ||
planX: number; | ||
planY: number; | ||
scale: number; | ||
width: number; | ||
height: number; | ||
}): { | ||
horizontalCloseEdge: CloseEdgeEnum; | ||
verticalCloseEdge: CloseEdgeEnum; | ||
}; |
/** | ||
* 获取移动或缩放之后的中心点 | ||
*/ | ||
export default function getPositionOnMoveOrScale({ x, y, clientX, clientY, fromScale, toScale, }: { | ||
export default function getPositionOnMoveOrScale({ x, y, clientX, clientY, offsetX, offsetY, fromScale, toScale, }: { | ||
x: number; | ||
@@ -9,2 +9,4 @@ y: number; | ||
clientY: number; | ||
offsetX?: number; | ||
offsetY?: number; | ||
fromScale: number; | ||
@@ -16,2 +18,4 @@ toScale: number; | ||
scale: number; | ||
lastMoveClientX: number; | ||
lastMoveClientY: number; | ||
}; |
{ | ||
"name": "react-photo-view", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "React photo preview.", | ||
@@ -30,5 +30,3 @@ "author": "MinJieLiu", | ||
"start": "rollup -c -w", | ||
"prepare": "npm run build", | ||
"predeploy": "cd example && npm install && npm run build", | ||
"deploy": "gh-pages -d example/build" | ||
"prepare": "npm run build" | ||
}, | ||
@@ -57,3 +55,2 @@ "dependencies": { | ||
"cross-env": "^6.0.3", | ||
"gh-pages": "^2.1.1", | ||
"less": "^3.10.3", | ||
@@ -60,0 +57,0 @@ "prettier": "^1.18.2", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
400816
26
33
4034