Skip to content

Commit

Permalink
focusing - tactics are always full opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
lakesare committed Aug 3, 2023
1 parent e918c9a commit 4608dcd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ html, * {



.node-not-focused{
.shape-node:hover{
cursor: pointer;
opacity: 0.65;
}

.shape-node.-not-focused{
opacity: 0.2;
}

Expand Down
4 changes: 4 additions & 0 deletions app/src/services/buildProofTree/services/DrawShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const tactic = (editor: Editor,
fill: "none",
color: "grey",
},
// probably better as a separate shape
meta: {
isTactic: true
}
},
]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/shapes/CustomNodeUtil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class CustomNodeUtil extends GeoShapeUtil {
const superRender = super.component(shape);

return <div
className={shape.meta.isFocused ? "" : "node-not-focused"}
className={shape.meta.isFocused || shape.meta.isTactic ? "shape-node" : "shape-node -not-focused"}
>
{superRender}
</div>
Expand Down

0 comments on commit 4608dcd

Please sign in to comment.