Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import { ResolutionPlugin } from '@photo-sphere-viewer/resolution-plugin';
import { SettingsPlugin } from '@photo-sphere-viewer/settings-plugin';
import '@photo-sphere-viewer/settings-plugin/index.css';
import { escape } from 'lodash-es';
import { onDestroy, onMount } from 'svelte';

// Adapted as well as possible from classlist 'border-solid border-white border-3 rounded-lg'
Expand Down Expand Up @@ -138,7 +139,7 @@

const fontSize = (1.4 * width) / box.text.length; // fits almost all strings within the box, depends on font family
const transform = `matrix3d(${matrix.join(',')})`;
const content = `<div class="${OCR_TOOLTIP_HTML_CLASS}" style="font-size: ${fontSize}px; width: ${width}px; height: ${height}px; transform: ${transform}; transform-origin: 0 0;">${box.text}</div>`;
const content = `<div class="${OCR_TOOLTIP_HTML_CLASS}" style="font-size: ${fontSize}px; width: ${width}px; height: ${height}px; transform: ${transform}; transform-origin: 0 0;">${escape(box.text)}</div>`;

if (updateOnly) {
markersPlugin.updateMarker({
Expand Down
Loading