setIsHoverColorPickerOpen(true)}
+ onMouseLeave={() => setIsHoverColorPickerOpen(false)}
+ style={{ display: 'inline-flex' }}
+ >
+
setIsHoverColorPickerOpen(false)}
+ position="left"
+ withArrow
+ shadow="md"
+ offset={8}
+ >
+
+ {
+ viewerContext?.setAnnotationMode(false);
+ setIsHoverColorPickerOpen(false); // Close hover color picker when toggling off
+ // Deactivate drawing tool when exiting annotation mode
+ if (signatureApiRef?.current) {
+ try {
+ signatureApiRef.current.deactivateTools();
+ } catch (error) {
+ console.log('Signature API not ready:', error);
+ }
+ }
+ }}
+ disabled={disabled}
+ aria-label="Drawing mode active"
+ >
+
+
+
+
+
+
+
Drawing Color
+
{
+ setIsHoverColorPickerOpen(false); // Close hover picker
+ setIsColorPickerOpen(true); // Open main color picker modal
+ }}
+ />
+
+
+
+
+
+ ) : (
+ // When inactive: Show "Draw" tooltip
+