From 0375b4aac050c76f971ad071ad1bd3f632b69283 Mon Sep 17 00:00:00 2001 From: llama Date: Mon, 14 Jul 2025 06:22:14 +0800 Subject: [PATCH] fix default-coloured io masks not following css var (#4202) --- ts/routes/image-occlusion/review.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/routes/image-occlusion/review.ts b/ts/routes/image-occlusion/review.ts index ae225449e..4425a8141 100644 --- a/ts/routes/image-occlusion/review.ts +++ b/ts/routes/image-occlusion/review.ts @@ -7,7 +7,7 @@ import { ModuleName, setupI18n } from "@tslib/i18n"; import { optimumPixelSizeForCanvas } from "./canvas-scale"; import { Shape } from "./shapes"; import { Ellipse, extractShapesFromRenderedClozes, Polygon, Rectangle, Text } from "./shapes"; -import { TEXT_BACKGROUND_COLOR, TEXT_FONT_FAMILY, TEXT_PADDING } from "./tools/lib"; +import { SHAPE_MASK_COLOR, TEXT_BACKGROUND_COLOR, TEXT_FONT_FAMILY, TEXT_PADDING } from "./tools/lib"; import type { Size } from "./types"; export type DrawShapesData = { @@ -217,7 +217,7 @@ function drawShapes( context, size, shape, - fill: shape.fill ?? properties.inActiveShapeColor, + fill: shape.fill !== SHAPE_MASK_COLOR ? shape.fill : properties.inActiveShapeColor, stroke: properties.inActiveBorder.color, strokeWidth: properties.inActiveBorder.width, }); @@ -437,7 +437,7 @@ function getShapeProperties(): ShapeProperties { activeShapeColor: activeShapeColor ? activeShapeColor : "#ff8e8e", inActiveShapeColor: inActiveShapeColor ? inActiveShapeColor - : "#ffeba2", + : SHAPE_MASK_COLOR, highlightShapeColor: highlightShapeColor ? highlightShapeColor : "#ff8e8e00",