diff --git a/src/data/layers/prestige.tsx b/src/data/layers/prestige.tsx index 30fe99f..6e3cb69 100644 --- a/src/data/layers/prestige.tsx +++ b/src/data/layers/prestige.tsx @@ -37,7 +37,7 @@ const layer = createLayer(id, function (this: BaseLayer) { color, reset })); - addTooltip(treeNode, { + const tooltip = addTooltip(treeNode, { display: createResourceTooltip(points), pinnable: true }); @@ -58,6 +58,7 @@ const layer = createLayer(id, function (this: BaseLayer) { name, color, points, + tooltip, display: jsx(() => ( <> diff --git a/src/features/tooltips/tooltip.ts b/src/features/tooltips/tooltip.ts index b5b1042..54d782c 100644 --- a/src/features/tooltips/tooltip.ts +++ b/src/features/tooltips/tooltip.ts @@ -95,18 +95,6 @@ export function addTooltip( } nextTick(() => { - if (options.pinnable) { - if ("pinned" in element) { - console.error( - "Cannot add pinnable tooltip to element that already has a property called 'pinned'" - ); - options.pinnable = false; - deletePersistent(options.pinned as Persistent); - } else { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (element as any).pinned = options.pinned; - } - } const elementComponent = element[Component]; element[Component] = TooltipComponent as GenericComponent; const elementGatherProps = element[GatherProps].bind(element);