diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-10-10 16:21:41 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-10-10 16:21:41 -0400 |
commit | 9e91e6065333f03d3f3bf2c0d43b822d85344c78 (patch) | |
tree | 4c923fc8257b597d69700bee4c1a4e69d3cbe21a /src/Utils.ts | |
parent | 368e33c076085b1b73f522ac88f548a2ad081c80 (diff) | |
parent | d929c0511cae863412a398f426d9e5b7ca64e6d9 (diff) |
merge?
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index 29824ba94..b5ca53a33 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -764,11 +764,12 @@ export function lightOrDark(color: any) { const col = DashColor(nonAlphaColor).rgb(); const colsum = col.red() + col.green() + col.blue(); if (colsum / col.alpha() > 400 || col.alpha() < 0.25) return Colors.DARK_GRAY; - else return Colors.WHITE; + return Colors.WHITE; } export function getWordAtPoint(elem: any, x: number, y: number): string | undefined { if (elem.tagName === 'INPUT') return 'input'; + if (elem.tagName === 'TEXTAREA') return 'textarea'; if (elem.nodeType === elem.TEXT_NODE) { const range = elem.ownerDocument.createRange(); range.selectNodeContents(elem); |