From 99624c469be0441d4de3f78b7c266b0965ade436 Mon Sep 17 00:00:00 2001
From: Anthony Geourjon <anthony.geourjon@tetras-libre.fr>
Date: Tue, 6 Feb 2024 11:21:33 +0100
Subject: [PATCH] Fix opacity defaultValue

---
 src/AnnotationCreationUtils.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/AnnotationCreationUtils.js b/src/AnnotationCreationUtils.js
index dbc8282..57a8bc6 100644
--- a/src/AnnotationCreationUtils.js
+++ b/src/AnnotationCreationUtils.js
@@ -37,6 +37,7 @@ export const SHAPES_TOOL = {
   SHAPES: 'shapes',
 };
 
+/** Check if the active tool is a shape tool */
 export function isShapesTool(activeTool) {
   // Find if active tool in the list of overlay tools. I want a boolean in return
   return Object.values(SHAPES_TOOL).find((tool) => tool === activeTool);
@@ -57,6 +58,7 @@ export async function saveAnnotation(canvas, storageAdapter, receiveAnnotation,
   }
 }
 
+/** Save annotation for each canvas */
 export async function saveAnnotationInEachCanvas(canvases, config, receiveAnnotation, annotation, target, isNewAnnotation) {
   canvases.forEach(async (canvas) => {
     // Adapt target to the canvas
@@ -70,9 +72,9 @@ export async function saveAnnotationInEachCanvas(canvases, config, receiveAnnota
 export const defaultToolState = {
   activeTool: OVERLAY_TOOL.EDIT,
   closedMode: 'closed',
-  fillColor: 'rgba(83,162, 235, 50)',
+  fillColor: 'rgba(83,162, 235, 0.5)',
   image: { id: null },
   imageEvent: null,
-  strokeColor: 'rgba(20,82,168,100)',
+  strokeColor: 'rgba(20,82,168,1)',
   strokeWidth: 2,
-}
+};
-- 
GitLab