Skip to content

Commit 6ad7790

Browse files
committed
Updated readme, add test btns in test project
1 parent 4ee9f77 commit 6ad7790

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

Json_exe.Blazor.Cropper.UITest/Pages/FetchData.razor

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
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

readme.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff 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
---

0 commit comments

Comments
 (0)