|
@@ -1,6 +1,6 @@
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
import { AssetResponseDto, api } from '@api';
|
|
import { AssetResponseDto, api } from '@api';
|
|
- import { createEventDispatcher } from 'svelte';
|
|
|
|
|
|
+ import { createEventDispatcher, onMount } from 'svelte';
|
|
import { notificationController, NotificationType } from './notification/notification';
|
|
import { notificationController, NotificationType } from './notification/notification';
|
|
import { handleError } from '$lib/utils/handle-error';
|
|
import { handleError } from '$lib/utils/handle-error';
|
|
import domtoimage from 'dom-to-image';
|
|
import domtoimage from 'dom-to-image';
|
|
@@ -13,6 +13,10 @@
|
|
const dispatch = createEventDispatcher();
|
|
const dispatch = createEventDispatcher();
|
|
let imgElement: HTMLDivElement;
|
|
let imgElement: HTMLDivElement;
|
|
|
|
|
|
|
|
+ onMount(() => {
|
|
|
|
+ imgElement.style.width = '100%';
|
|
|
|
+ });
|
|
|
|
+
|
|
const hasTransparentPixels = async (blob: Blob) => {
|
|
const hasTransparentPixels = async (blob: Blob) => {
|
|
const img = new Image();
|
|
const img = new Image();
|
|
img.src = URL.createObjectURL(blob);
|
|
img.src = URL.createObjectURL(blob);
|