forked from trent_larson/crowd-funder-for-time-pwa
fix cropping problem where long images go off the screen
This commit is contained in:
@@ -29,8 +29,7 @@
|
|||||||
<div v-if="crop">
|
<div v-if="crop">
|
||||||
<VuePictureCropper
|
<VuePictureCropper
|
||||||
:boxStyle="{
|
:boxStyle="{
|
||||||
width: '100%',
|
height: window80(),
|
||||||
height: '100%',
|
|
||||||
backgroundColor: '#f8f8f8',
|
backgroundColor: '#f8f8f8',
|
||||||
margin: 'auto',
|
margin: 'auto',
|
||||||
}"
|
}"
|
||||||
@@ -278,7 +277,6 @@ export default class PhotoDialog extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private createBlobURL(blob: Blob): string {
|
private createBlobURL(blob: Blob): string {
|
||||||
console.log("blob", blob);
|
|
||||||
return URL.createObjectURL(blob);
|
return URL.createObjectURL(blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,6 +395,10 @@ export default class PhotoDialog extends Vue {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window80() {
|
||||||
|
return window.innerHeight * 0.8 + "px";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -165,12 +165,6 @@ export default class SharedPhotoView extends Vue {
|
|||||||
);
|
);
|
||||||
formData.append("claimType", imageType);
|
formData.append("claimType", imageType);
|
||||||
|
|
||||||
console.log(
|
|
||||||
"Sending image to server",
|
|
||||||
formData,
|
|
||||||
headers,
|
|
||||||
DEFAULT_IMAGE_API_SERVER + "/image",
|
|
||||||
);
|
|
||||||
const response = await axios.post(
|
const response = await axios.post(
|
||||||
DEFAULT_IMAGE_API_SERVER + "/image",
|
DEFAULT_IMAGE_API_SERVER + "/image",
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
Reference in New Issue
Block a user