Skip to content
Snippets Groups Projects
Commit 6183e098 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

catch erreur si serveur le iiif ne répond pas lors de l'édition d'une image

parent dd9ba7f4
No related branches found
No related tags found
No related merge requests found
Pipeline #15108 passed
...@@ -420,7 +420,10 @@ export default { ...@@ -420,7 +420,10 @@ export default {
this.maxHeight = document.querySelector('.jama-image-editor').clientHeight - 2 * this.margin; this.maxHeight = document.querySelector('.jama-image-editor').clientHeight - 2 * this.margin;
} }
this.renderedImageDimensions = {width: this.imgWidth, height: this.imgHeight}; this.renderedImageDimensions = {width: this.imgWidth, height: this.imgHeight};
})) })).catch((error) => {
this.$jamaAlert(error);
this.loading = false;
});
}, },
doIt() { doIt() {
...@@ -446,7 +449,10 @@ export default { ...@@ -446,7 +449,10 @@ export default {
this.reset(); this.reset();
this.resetZoom(); this.resetZoom();
this.loading = false; this.loading = false;
}) }).catch((error) => {
this.$jamaAlert(error);
this.loading = false;
});
} }
} }
) )
...@@ -600,9 +606,15 @@ export default { ...@@ -600,9 +606,15 @@ export default {
}, },
zoomIn(offset, origin = '0% 0%') { zoomIn(offset, origin = '0% 0%') {
try {
this.zoom += offset; this.zoom += offset;
document.getElementById('img-viewer').style.transform = 'scale(' + this.zoom + ')'; document.getElementById('img-viewer').style.transform = 'scale(' + this.zoom + ')';
document.getElementById('img-viewer').style.transformOrigin = origin; document.getElementById('img-viewer').style.transformOrigin = origin;
}
catch(e){
console.log(e);
this.$jamaAlert("Une erreur est survenue.");
}
}, },
zoomAtScrolledPoint(event) { zoomAtScrolledPoint(event) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment