Skip to content

Commit

Permalink
Fix for safari
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaOrson committed Dec 28, 2024
1 parent d8c7b0d commit bda2224
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Hack to render equations from the markdown file
<!-- Workaround to render equations from the markdown file
https://github.com/pngwn/MDsveX/issues/302#issuecomment-1041293000 -->

<svelte:head>
Expand Down Expand Up @@ -130,8 +130,8 @@ https://github.com/pngwn/MDsveX/issues/302#issuecomment-1041293000 -->
function handleCanvasClick(event: MouseEvent | KeyboardEvent) {
if (event instanceof MouseEvent) {
const svg = document.querySelector('.phase-space') as SVGGraphicsElement;
const pt = new DOMPoint();
const svg = document.querySelector('.phase-space') as SVGSVGElement;
const pt = svg.createSVGPoint();
const CTM = svg.getScreenCTM();
if (CTM) {
Expand Down Expand Up @@ -199,6 +199,8 @@ https://github.com/pngwn/MDsveX/issues/302#issuecomment-1041293000 -->
tabindex="0"
>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox={`0 0 ${WIDTH} ${HEIGHT}`}
preserveAspectRatio="xMidYMid meet"
role="img"
Expand Down

0 comments on commit bda2224

Please sign in to comment.