Skip to content

Commit

Permalink
Update API doc for cropImage function 💞
Browse files Browse the repository at this point in the history
  • Loading branch information
willnguyen1312 committed Nov 14, 2023
1 parent 33c2fbd commit b168a81
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/docs/src/api/cropImage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ Crop the current image based on the zoom level
### Basic Usage

```ts
const croppedImage = cropImage({
currentZoom: number
image: HTMLImageElement
positionX: number
positionY: number
})
const croppedImage = await cropImage(arg: CropImageArg)
```

### Type Declaration
Expand All @@ -29,7 +24,9 @@ type CropImageArg = {
positionY: number
// Current zoom level from createZoomImageWheel
currentZoom: number
// Current rotation from createZoomImageWheel - default 0
rotation?: number
}

function cropImage = (arg: CropImageArg) => string
async function cropImage = (arg: CropImageArg) => string
```

0 comments on commit b168a81

Please sign in to comment.