Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Bardadym committed Dec 27, 2024
1 parent 112ac38 commit caad719
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin/template-types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

export type TemplateType = "sunburst" | "treemap" | "network" | "raw-data" | "list" ;
export type TemplateType = "sunburst" | "treemap" | "network" | "raw-data" | "list";

const templates: ReadonlyArray<TemplateType> = [
"sunburst",
Expand Down
4 changes: 2 additions & 2 deletions src/network/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export const Tooltip: FunctionalComponent<TooltipProps> = ({ node, visible }) =>

if (pos.left + boundingRect.width > window.innerWidth) {
// Shifting horizontally
pos.left = Math.max(0,window.innerWidth - boundingRect.width);
pos.left = Math.max(0, window.innerWidth - boundingRect.width);
}

if (pos.top + boundingRect.height > window.innerHeight) {
// Flipping vertically
pos.top = Math.max(0,mouseCoords.y - Tooltip_marginY - boundingRect.height);
pos.top = Math.max(0, mouseCoords.y - Tooltip_marginY - boundingRect.height);
}

setStyle(pos);
Expand Down
4 changes: 2 additions & 2 deletions src/treemap/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ export const Tooltip: FunctionalComponent<TooltipProps> = ({

if (pos.left + boundingRect.width > window.innerWidth) {
// Shifting horizontally
pos.left = Math.max(0,window.innerWidth - boundingRect.width);
pos.left = Math.max(0, window.innerWidth - boundingRect.width);
}

if (pos.top + boundingRect.height > window.innerHeight) {
// Flipping vertically
pos.top = Math.max(0,mouseCoords.y - Tooltip_marginY - boundingRect.height);
pos.top = Math.max(0, mouseCoords.y - Tooltip_marginY - boundingRect.height);
}

setStyle(pos);
Expand Down

0 comments on commit caad719

Please sign in to comment.