Browse Source

fix cropping problem where long images go off the screen

kb/add-usage-guide
Trent Larson 4 months ago
parent
commit
ee3d4acb58
  1. 8
      src/components/PhotoDialog.vue
  2. 6
      src/views/SharedPhotoView.vue

8
src/components/PhotoDialog.vue

@ -29,8 +29,7 @@
<div v-if="crop">
<VuePictureCropper
:boxStyle="{
width: '100%',
height: '100%',
height: window80(),
backgroundColor: '#f8f8f8',
margin: 'auto',
}"
@ -278,7 +277,6 @@ export default class PhotoDialog extends Vue {
}
private createBlobURL(blob: Blob): string {
console.log("blob", blob);
return URL.createObjectURL(blob);
}
@ -397,6 +395,10 @@ export default class PhotoDialog extends Vue {
);
}
}
window80() {
return window.innerHeight * 0.8 + "px";
}
}
</script>

6
src/views/SharedPhotoView.vue

@ -165,12 +165,6 @@ export default class SharedPhotoView extends Vue {
);
formData.append("claimType", imageType);
console.log(
"Sending image to server",
formData,
headers,
DEFAULT_IMAGE_API_SERVER + "/image",
);
const response = await axios.post(
DEFAULT_IMAGE_API_SERVER + "/image",
formData,

Loading…
Cancel
Save