You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,8 +127,8 @@ See [#428](https://github.com/ValentinH/react-easy-crop/issues/428), [#409](http
127
127
|`restrictPosition`| boolean || Whether the position of the media should be restricted to the boundaries of the cropper. Useful setting in case of `zoom < 1` or if the cropper should preserve all media content while forcing a specific aspect ratio for media throughout the application. |
128
128
|`initialCroppedAreaPercentages`|`{ width: number, height: number, x: number, y: number}`|| Use this to set the initial crop position/zoom of the cropper (for example, when editing a previously cropped media). The value should be the same as the `croppedArea` passed to [`onCropComplete`](#onCropCompleteProp). This is the preferred way of restoring the previously set crop because `croppedAreaPixels` is rounded, and when used for restoration, may result in a slight drifting crop/zoom |
129
129
|`initialCroppedAreaPixels`|`{ width: number, height: number, x: number, y: number}`|| Use this to set the initial crop position/zoom of the cropper (for example, when editing a previously cropped media). The value should be the same as the `croppedAreaPixels` passed to [`onCropComplete`](#onCropCompleteProp). |
130
-
|`onInteractionStart`|`Function`|| Called every time a user starts a wheel, touch, mousedown or keydown (for arrow keys only) event. |
131
-
|`onInteractionEnd`|`Function`|| Called every time a user ends a wheel, touch, mousedown or keydown (for arrow keys only) event. |
130
+
|`onInteractionStart`|`({ source }) => void`|| Called every time a user starts a wheel, touch, mousedown or keydown (for arrow keys only) event. `source` is `'mouse'`, `'touch'`, `'wheel'` or `'keyboard'`.|
131
+
|`onInteractionEnd`|`({ source }) => void`|| Called every time a user ends a wheel, touch, mousedown or keydown (for arrow keys only) event. `source` is `'mouse'`, `'touch'`, `'wheel'` or `'keyboard'`.|
132
132
|`onMediaLoaded`|`Function`|| Called when media gets loaded. Gets passed an `mediaSize` object like `{ width, height, naturalWidth, naturalHeight }`|
133
133
|`onTouchRequest`|`(e: React.TouchEvent<HTMLDivElement>) => boolean`|| Can be used to cancel a touch request by returning `false`. |
134
134
|`onWheelRequest`|`(e: WheelEvent) => boolean`|| Can be used to cancel a zoom with wheel request by returning `false`. |
0 commit comments