Apply review suggestions from @nilsding
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
parent
3d21beff39
commit
a18bf040b3
|
@ -38,12 +38,13 @@ 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)
|
||||||
});
|
});
|
||||||
}, {
|
}, {
|
||||||
once: true
|
once: true
|
||||||
});
|
});
|
||||||
|
|
||||||
this.cropperTarget.src = src;
|
this.cropperTarget.src = src;
|
||||||
|
|
Loading…
Reference in New Issue