Skip to content

Commit

Permalink
fix(interactive): missing constructor to initialize state in HoverTex…
Browse files Browse the repository at this point in the history
…tNearMouse

The constructor got deleted in the refactoring, restoring.

Found in #435
  • Loading branch information
markmcdowell committed Aug 28, 2020
1 parent ead981c commit 27f410a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/interactive/src/components/HoverTextNearMouse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ export class HoverTextNearMouse extends React.Component<HoverTextNearMouseProps,

private readonly textNode = React.createRef<SVGTextElement>();

public constructor(props: HoverTextNearMouseProps) {
super(props);

this.state = {
textWidth: undefined,
textHeight: undefined,
};
}

public componentDidMount() {
this.updateTextSize();
}
Expand Down

0 comments on commit 27f410a

Please sign in to comment.