Appease the dog overlords

This commit is contained in:
Andreas Nedbal 2023-01-22 17:58:23 +01:00
parent f0df18ce87
commit fe156a38d3
2 changed files with 5 additions and 5 deletions

View File

@ -18,18 +18,18 @@ export default class extends Controller {
declare readonly aspectRatioValue: string;
readImage(file, callback) {
readImage(file: File, callback: (string) => void): void {
callback((window.URL || window.webkitURL).createObjectURL(file));
}
updateValues(data) {
updateValues(data: Record<string, string>): void {
this.xTarget.value = data.x;
this.yTarget.value = data.y;
this.wTarget.value = data.width;
this.hTarget.value = data.height;
}
change() {
change(): void {
this.controlsTarget.classList.toggle('d-none');
if (this.inputTarget.files && this.inputTarget.files[0]) {