Check if cropper is dirty #199
-
I'm trying to figure out what's the easiest way to check if crop/size/etc has changed since the component was mounted on Vue 3. Unfortunately, the So far, the only way I found is watching everything Any hint will be appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@lucianobosco, I can offer you to use In the new core it will be pretty easy, you can easily retrieve default state and compare it with the current state: import { isEqualStates } from 'advanced-cropper/service' const cropper = cropperRef.value;
if (cropper) {
const state = cropper.getState();
const image = cropper.getImage();
if (state && image) {
isEqualStates(state, cropper.getDefaultState(state.boundary, image));
}
return true;
} But currently it's not available. |
Beta Was this translation helpful? Give feedback.
@lucianobosco, I can offer you to use
@ready
event, save the initial state as the default state and compare the current state with one. The example.In the new core it will be pretty easy, you can easily retrieve default state and compare it with the current state:
But currently it's not available.