Apply review suggestions from @nilsding

Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
Andreas Nedbal 2023-08-07 22:01:04 +02:00
parent 3d21beff39
commit a18bf040b3
1 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@ export default class extends Controller {
new Croppr(this.cropperTarget, { new Croppr(this.cropperTarget, {
aspectRatio: parseFloat(this.aspectRatioValue), aspectRatio: parseFloat(this.aspectRatioValue),
startSize: [100, 100, '%'], startSize: [100, 100, '%'],
onInitialize: (instance) => { this.updateValues(instance.getValue()) },
onCropStart: this.updateValues.bind(this), onCropStart: this.updateValues.bind(this),
onCropMove: this.updateValues.bind(this), onCropMove: this.updateValues.bind(this),
onCropEnd: this.updateValues.bind(this) onCropEnd: this.updateValues.bind(this)