editor: fix load after resize
Signed-off-by: Varun Patil <varunpatil@ucla.edu>pull/579/head
parent
bc704e8221
commit
bb047d9418
|
@ -344,6 +344,9 @@ class ImageController extends GenericApiController
|
||||||
$file->putContent($blob);
|
$file->putContent($blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure the preview is updated
|
||||||
|
\OC::$server->get(\OCP\IPreview::class)->getPreview($file);
|
||||||
|
|
||||||
return new JSONResponse([
|
return new JSONResponse([
|
||||||
'fileid' => $file->getId(),
|
'fileid' => $file->getId(),
|
||||||
'etag' => $file->getEtag(),
|
'etag' => $file->getEtag(),
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
import { IDay, IPhoto, IRow, IRowType } from "../../types";
|
import { IDay, IImageInfo, IPhoto, IRow, IRowType } from "../../types";
|
||||||
import { PsSlide } from "./types";
|
import { PsSlide } from "./types";
|
||||||
|
|
||||||
import UserConfig from "../../mixins/UserConfig";
|
import UserConfig from "../../mixins/UserConfig";
|
||||||
|
@ -800,8 +800,14 @@ export default defineComponent({
|
||||||
|
|
||||||
// Lazy load the rest of EXIF data
|
// Lazy load the rest of EXIF data
|
||||||
if (!photo.imageInfo) {
|
if (!photo.imageInfo) {
|
||||||
axios.get(API.IMAGE_INFO(photo.fileid)).then((res) => {
|
axios.get<IImageInfo>(API.IMAGE_INFO(photo.fileid)).then((res) => {
|
||||||
photo.imageInfo = res.data;
|
photo.imageInfo = res.data;
|
||||||
|
|
||||||
|
// Update params in photo object
|
||||||
|
photo.w = res.data.w;
|
||||||
|
photo.h = res.data.h;
|
||||||
|
photo.basename = res.data.basename;
|
||||||
|
photo.mimetype = res.data.mimetype;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue