Skip to content

Commit

Permalink
style: Introduce new color for anchors to transform shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
miyanokomiya committed Apr 8, 2024
1 parent 0fb5dca commit 708b933
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/composables/shapeHandlers/roundedRectangleHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const newRoundedRectangleHandler = defineShapeHandler<RoundedRectangleHit
if (highlight) {
applyFillStyle(ctx, { color: style.selectionSecondaly });
} else {
applyFillStyle(ctx, { color: style.selectionPrimary });
applyFillStyle(ctx, { color: style.transformAnchor });
}

ctx.beginPath();
Expand Down
4 changes: 2 additions & 2 deletions src/composables/shapeHandlers/simplePolygonHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export const newSimplePolygonHandler = defineShapeHandler<SimplePolygonHitResult
applyFillStyle(ctx, { color: style.selectionSecondaly });
applyStrokeStyle(ctx, { color: style.selectionSecondaly });
} else {
applyFillStyle(ctx, { color: style.selectionPrimary });
applyStrokeStyle(ctx, { color: style.selectionPrimary });
applyFillStyle(ctx, { color: style.transformAnchor });
applyStrokeStyle(ctx, { color: style.transformAnchor });
}
ctx.beginPath();
ctx.arc(p.x, p.y, threshold, 0, TAU);
Expand Down
1 change: 1 addition & 0 deletions src/models/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function createStyleScheme(): StyleScheme {
selectionPrimary: createColor(65, 105, 225),
selectionSecondaly: createColor(64, 224, 208),
selectionLineWidth: 3,
transformAnchor: createColor(250, 250, 55),
alert: createColor(224, 0, 0),
};
}
1 change: 1 addition & 0 deletions src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface StyleScheme {
selectionPrimary: Color;
selectionSecondaly: Color;
selectionLineWidth: number;
transformAnchor: Color;
alert: Color;
}

Expand Down

0 comments on commit 708b933

Please sign in to comment.