We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting the initialImage to a url in any way will break chosenFile,
Steps to reproduce:
error: croppa.chosenFile === null
expected: croppa.chonsenFile = file
I've tried:
onMounted(() => { const img = new Image(); img.onload = () => { state.image = img; state.croppa.refresh(); }; img.src = state.initialImg; });
The text was updated successfully, but these errors were encountered:
Here is the vue component
<div class="flex items-center justify-center"> <croppa v-model="croppa" :width="390" :height="390" accept=".jpeg, .png" :initial-image="image" placeholder :class="{'has-file' : initialImg || croppa.chosenFile}" canvas-color="#FFF" :show-remove-button="false" :prevent-white-space="true" @draw="manipulated = true" > <div v-if="!initialImg && !croppa.chosenFile" @click="croppa.chooseFile()" class="absolute inset-0 flex items-center justify-center" > <div class="placehoder"> <div class="mx-auto w-16 mb-5"> <icon icon="image" class="w-full fill-current" /> </div> <p class="font-label underline">Click to select profile picture</p> </div> </div> <div v-if="initialImg || croppa.chosenFile" class="absolute left-0 bottom-0 w-full mb-10 flex items-center justify-center" > <o-button type="secondary" class="--small" @click="chooseFile">Edit</o-button> </div> </croppa> </div>
Sorry, something went wrong.
Yeah this is a nasty bug.
Basically:
No branches or pull requests
Setting the initialImage to a url in any way will break chosenFile,
Steps to reproduce:
error:
croppa.chosenFile === null
expected:
croppa.chonsenFile = file
I've tried:
The text was updated successfully, but these errors were encountered: