🚨 cleanup

This commit is contained in:
2024-07-15 22:09:03 +00:00
parent 41bdd55358
commit 9ed2f70701
8 changed files with 19 additions and 167 deletions

View File

@@ -22,7 +22,6 @@ import { computed, defineProps, inject, ref, watch } from 'vue';
import {ReceiverSymbol} from '../../model/injectionSymbols';
const video = ref<HTMLVideoElement>();
const image = ref<HTMLImageElement>();
const canvas = ref<HTMLCanvasElement>();
const props = defineProps<{
@@ -37,12 +36,7 @@ const isImage = computed(() => props.src?.endsWith('.png') || props.src?.endsWit
const isVideo = computed(() => props.src?.endsWith('.mp4') || props.src?.endsWith('.webm'));
const mediaDimensions = ref({width: 0, height: 0});
const virtualMediaDimensions = ref({width: 0, height: 0});
const windowSize = {
width: window.innerWidth,
height: window.innerHeight,
};
watch(() => props.src, (src) => {
if (isImage.value) {
@@ -113,14 +107,6 @@ const dynamicStyle = computed(() => {
});
function onImageLoaded(event: Event) {
console.log('image loaded', event.target);
mediaDimensions.value = {
width: image.value!.naturalWidth,
height: image.value!.naturalHeight,
};
}
function onVideoLoaded(event: Event) {
console.log('video loaded', event.target);
mediaDimensions.value = {
@@ -129,12 +115,6 @@ function onVideoLoaded(event: Event) {
};
}
function updateImageSize() {
if (image.value) {
image.value.width = props.width;
}
}
</script>
<style>
.map-scene {