Skip to content

Commit

Permalink
fix: Do not destroy SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Jul 15, 2023
1 parent 7ad0cd5 commit cfbd238
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/components/Svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export type Svg = {
textType: TextType,
options?: MeasureTextOptions
) => DOMRect;
destroy: () => void;
};

export type SVGSelection = Selection<
Expand Down Expand Up @@ -81,14 +80,9 @@ export const createSvg = (div: HTMLDivElement, options: StoryOptions): Svg => {
};
};

const destroy = (): void => {
selection.remove();
};

return {
selection,
measure,
measureText,
destroy,
};
};
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ const makeStory = (
const destroy = (): void => {
resizeObserver.destroy();
fontLoadObserver.destroy();
svg.destroy();
};

return {
Expand Down

0 comments on commit cfbd238

Please sign in to comment.