ui: revert lib
This commit is contained in:
parent
0b7b857d65
commit
5267a1c830
5 changed files with 6 additions and 4 deletions
|
|
@ -2,7 +2,7 @@ import { fileNameFormat } from 'App/utils';
|
|||
|
||||
export const getPdf2 = async () => {
|
||||
// @ts-ignore
|
||||
import('html2canvas-pro').then(({ default: html2canvas }) => {
|
||||
import('html2canvas').then(({ default: html2canvas }) => {
|
||||
// @ts-ignore
|
||||
window.html2canvas = html2canvas;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
export const renderClickmapThumbnail = () => {
|
||||
// @ts-ignore
|
||||
return import('html2canvas-pro').then(({ default: html2canvas }) => {
|
||||
return import('html2canvas').then(({ default: html2canvas }) => {
|
||||
// @ts-ignore
|
||||
window.html2canvas = html2canvas;
|
||||
const element = document.querySelector<HTMLIFrameElement>('#clickmap-render * iframe').contentDocument.body
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ window.__debugElementToImage = (el) => elementToImage(el).then(img => {
|
|||
function elementToImage(doc: Document) {
|
||||
const el = doc.body
|
||||
const srcMap = new WeakMap<HTMLImageElement, string>()
|
||||
return import('html2canvas-pro').then(({ default: html2canvas }) => {
|
||||
return import('html2canvas').then(({ default: html2canvas }) => {
|
||||
const images = doc.querySelectorAll('img')
|
||||
images.forEach((img) => {
|
||||
const sameOrigin = new URL(img.src, location.href).origin === location.origin
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
"fzstd": "^0.1.1",
|
||||
"hls.js": "^1.5.13",
|
||||
"html-to-image": "^1.9.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"html2canvas-pro": "^1.5.8",
|
||||
"immutable": "^4.3.7",
|
||||
"jest-environment-jsdom": "^29.5.0",
|
||||
|
|
|
|||
|
|
@ -8662,7 +8662,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"html2canvas@npm:^1.0.0-rc.5":
|
||||
"html2canvas@npm:^1.0.0-rc.5, html2canvas@npm:^1.4.1":
|
||||
version: 1.4.1
|
||||
resolution: "html2canvas@npm:1.4.1"
|
||||
dependencies:
|
||||
|
|
@ -11637,6 +11637,7 @@ __metadata:
|
|||
hls.js: "npm:^1.5.13"
|
||||
html-to-image: "npm:^1.9.0"
|
||||
html-webpack-plugin: "npm:^5.5.0"
|
||||
html2canvas: "npm:^1.4.1"
|
||||
html2canvas-pro: "npm:^1.5.8"
|
||||
immutable: "npm:^4.3.7"
|
||||
jest: "npm:^29.5.0"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue