mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
lint/tsc
This commit is contained in:
parent
59a365bb4e
commit
f5b9f5a910
@ -546,9 +546,6 @@ export function AnnotationPanel(props: AnnotationPanelProps) {
|
||||
);
|
||||
|
||||
const selectedDerivedTool = selectedAnn?.object ? deriveToolFromAnnotation(selectedAnn.object) : undefined;
|
||||
const selectedIsTextMarkup =
|
||||
(selectedAnn?.object?.type && [9, 10, 11, 12].includes(selectedAnn.object.type)) ||
|
||||
(selectedDerivedTool ? ['highlight', 'underline', 'strikeout', 'squiggly'].includes(selectedDerivedTool) : false);
|
||||
|
||||
const selectedAnnotationControls = selectedAnn && (() => {
|
||||
const rawType = selectedAnn.object?.type;
|
||||
@ -888,7 +885,7 @@ export function AnnotationPanel(props: AnnotationPanelProps) {
|
||||
);
|
||||
}
|
||||
|
||||
if ([4, 8].includes(type) || toolId === 'line' || toolId === 'polyline') {
|
||||
if ((type !== undefined && [4, 8].includes(type)) || toolId === 'line' || toolId === 'polyline') {
|
||||
return (
|
||||
<Paper withBorder p="sm" radius="md">
|
||||
<Stack gap="sm">
|
||||
@ -944,7 +941,7 @@ export function AnnotationPanel(props: AnnotationPanelProps) {
|
||||
);
|
||||
}
|
||||
|
||||
if ([5, 6, 7].includes(type) || toolId === 'square' || toolId === 'circle' || toolId === 'polygon') {
|
||||
if ((type !== undefined && [5, 6, 7].includes(type)) || toolId === 'square' || toolId === 'circle' || toolId === 'polygon') {
|
||||
const shapeName = type === 5 ? 'Square' : type === 6 ? 'Circle' : 'Polygon';
|
||||
const strokeColorValue = selectedAnn.object?.strokeColor ?? shapeStrokeColor;
|
||||
const fillColorValue = selectedAnn.object?.color ?? shapeFillColor;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user