composer require ldc/web-status-checker-laravel remove Old static status checker Fix ImportMedia WIP commands OK many fixes Fix and try to optimize folder component Fix front icons + actions based on icons Favico front fix alert Fix Media upload on depot fix folder component buttons Full front fix with perf due tu vuejs Download medias Navigate within medias superfix Move media + loader isLocked boolean and remove media fix Folder scroll fix arcadia link color red Fix panier show external Tons of fixes back as front REwrited all
50 lines
980 B
Vue
50 lines
980 B
Vue
<template>
|
|
<div :id="id" :style="nStyle"></div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "OpenSeadreagonComponent",
|
|
props: {
|
|
id: {
|
|
type: String,
|
|
},
|
|
options: {
|
|
type: Object,
|
|
},
|
|
nStyle: {
|
|
type: String,
|
|
},
|
|
},
|
|
data: function () {
|
|
return {
|
|
viewer: null,
|
|
};
|
|
},
|
|
updated: function () {
|
|
if (this.viewer) {
|
|
this.viewer.destroy();
|
|
this.viewer = null;
|
|
}
|
|
if (this.id !== "openseadragon_undefined") this.setup();
|
|
},
|
|
watch: {
|
|
options: {
|
|
handler(n, o) {
|
|
// Pour reload la preivew en cas d'upload d'un nouveau média
|
|
this.$forceUpdate();
|
|
},
|
|
deep: true, // Pour checker dans tout l'objet si il y a un changement
|
|
},
|
|
},
|
|
methods: {
|
|
setup: function () {
|
|
if (!this.viewer && this.options) {
|
|
const _options = this.options;
|
|
_options.id = this.id;
|
|
this.viewer = new OpenSeadragon(_options);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|