fix: decouple pure functions from hyperlink to prevent mermaid bundling (#7710)

* move hyperlink code into its folder

* move pure js functions to hyperlink/helpers and move actionLink to actions

* fix tests

* fix
This commit is contained in:
Aakansha Doshi 2024-02-20 20:59:01 +05:30 committed by GitHub
parent 79d9dc2f8f
commit 2e719ff671
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 198 additions and 176 deletions

View file

@ -33,6 +33,10 @@ import { getCommonBounds, getElementPointsCoords } from "../../element/bounds";
import { rotatePoint } from "../../math";
import { getTextEditor } from "../queries/dom";
import { arrayToMap } from "../../utils";
import { createTestHook } from "../../components/App";
// so that window.h is available when App.tsx is not imported as well.
createTestHook();
const { h } = window;
@ -460,7 +464,6 @@ export class UI {
mouse.reset();
mouse.up(x + width, y + height);
}
const origElement = h.elements[h.elements.length - 1] as any;
if (angle !== 0) {