Skip to content

Commit

Permalink
fix: use tolgee color for highliting
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Jun 10, 2024
1 parent 70248ba commit 59f43a2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/endpoints/highlightNode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { createEndpoint } from "../utils/createEndpoint";

const HIGHLIGHT_COLOR: SolidPaint = {
type: "SOLID",
color: { r: 1, g: 0.41, b: 0.58 },
};

export type HighlightNodeProps = {
id: string;
};
Expand All @@ -16,13 +21,9 @@ export const highlightNodeEndpoint = createEndpoint(
}

if (node && !highlitedNodes.has(id)) {
const paint: SolidPaint = {
type: "SOLID",
color: { r: 1, g: 0, b: 0 },
};
highlitedNodes.set(id, node.fills);
const original = node.fills;
node.fills = [paint];
node.fills = [HIGHLIGHT_COLOR];

setTimeout(() => {
node.fills = original;
Expand Down

0 comments on commit 59f43a2

Please sign in to comment.