mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
fix(studio): resolve flat-inspector review defects
This commit is contained in:
@@ -29,6 +29,22 @@ export function isSelectedElementHidden(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 4-part element identity for keying panel remounts on selection change —
|
||||
* id or selector alone collides for id-less same-selector siblings, leaving
|
||||
* mount-initialized state pointed at the previous element.
|
||||
*/
|
||||
export function selectionIdentityKey(
|
||||
element: Pick<DomEditSelection, "id" | "hfId" | "selector" | "selectorIndex">,
|
||||
): string {
|
||||
return [
|
||||
element.id ?? "",
|
||||
element.hfId ?? "",
|
||||
element.selector ?? "",
|
||||
String(element.selectorIndex ?? ""),
|
||||
].join("|");
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* Font types & constants (shared by font and section modules) */
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
Reference in New Issue
Block a user