File tree Expand file tree Collapse file tree
Json_exe.Blazor.Cropper.UITest/Pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99<CropperWrapper @ref =" CropperWrapperRef" OnReady =" OnReady" ImageSrc =" sample-data/testImage.jpeg" Alt =" Test-Image" />
1010
1111<div class =" vstack mt-5 gap-3" >
12- <button class =" btn-primary w-auto" >Test!</button >
12+ <button class =" btn-primary w-auto mt-3" @onclick =" @(() => CropperWrapperRef.Reset())" >Reset</button >
13+ <button class =" btn-primary w-auto mt-3" @onclick =" @(() => CropperWrapperRef.Clear())" >Clear</button >
14+ <button class =" btn-primary w-auto mt-3" @onclick =" @(() => CropperWrapperRef.Enable())" >Enable</button >
15+ <button class =" btn-primary w-auto mt-3" @onclick =" @(() => CropperWrapperRef.Disable())" >Disable</button >
16+ <button class =" btn-primary w-auto mt-3" @onclick =" @(() => CropperWrapperRef.Zoom(0.1))" >Zoom</button >
17+ <button class =" btn-primary w-auto mt-3" @onclick =" @(() => CropperWrapperRef.RotateTo(90))" >RotateTo</button >
1318</div >
1419
1520@code
Original file line number Diff line number Diff line change @@ -66,6 +66,23 @@ The following methods are available to use atm.
6666 - y : The amount of pixels you want to move the image on the y axis
6767- ** GoBack ()** :
6868 - Goes back to the previous state of the image inside the changes list .
69+ - ** Reset ()** :
70+ - Resets the image to the original state .
71+ - ** Clear ()** :
72+ - Clears the image inside the Canvas .
73+ - ** Replace (string imageSrc )** :
74+ - Replaces the image inside the Canvas with the given imageSrc .
75+ - imageSrc : The Base64 string of the image you want to replace the current image with .
76+ - ** Enable ()** :
77+ - Enables the Cropper .
78+ - ** Disable ()** :
79+ - Disables the Cropper .
80+ - ** Zoom (double ratio )** :
81+ - Zooms the image inside the Canvas .
82+ - ratio : The amount of zoom you want to apply to the image .
83+ - ** RotateTo (int degree )** :
84+ - Rotates the image to the given degree .
85+ - degree : The degree you want to rotate the image to .
6986
7087### Options
7188-- -
You can’t perform that action at this time.
0 commit comments