diff options
author | bobzel <zzzman@gmail.com> | 2023-11-01 23:54:49 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-11-01 23:54:49 -0400 |
commit | 84c15417f2247fc650a9f7b2c959479519bd3ebb (patch) | |
tree | f97f9f34ed0a1e65394f7b9e3818a9075b3a64f7 /src/Utils.ts | |
parent | 58213b0201ea0191f06f42beac9c3a17ebfc98ea (diff) |
fixes to snapping lines when dragging/resizing (lines are created for doc not being dragged, snapping lines are created for documents in groups). cleanup of pres path code.
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index 34419f665..330ca59f9 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -758,7 +758,7 @@ export function DashColor(color: string) { } export function lightOrDark(color: any) { - if (color === 'transparent') return Colors.DARK_GRAY; + if (color === 'transparent' || !color) return Colors.DARK_GRAY; if (color.startsWith?.('linear')) return Colors.BLACK; const nonAlphaColor = color.startsWith('#') ? (color as string).substring(0, 7) : color.startsWith('rgba') ? color.replace(/,.[^,]*\)/, ')').replace('rgba', 'rgb') : color; const col = DashColor(nonAlphaColor).rgb(); |