diff options
author | bobzel <zzzman@gmail.com> | 2024-10-11 20:21:33 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-10-11 20:21:33 -0400 |
commit | bb8fe2933154c6db70cfe5da1e890535bc9012d4 (patch) | |
tree | bee06f8b6649f51388439145dae45213ac729279 /src/client/views/StyleProvider.tsx | |
parent | 0f83debd8d2cca04d9fac959c7ed450312ef8d7d (diff) |
fixed verticalalign of text boxes on load when existing text was there. fixe scrolling of vertical align textboxes when fitwidth is set. added flashcard contextmenu to comparisonbox and
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r-- | src/client/views/StyleProvider.tsx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx index 02e0a34d8..8859f6464 100644 --- a/src/client/views/StyleProvider.tsx +++ b/src/client/views/StyleProvider.tsx @@ -54,7 +54,6 @@ export function styleFromLayoutString(doc: Doc, props: FieldViewProps, scale: nu } export function border(doc: Doc, pw: number, ph: number, rad: number = 0, inset: number = 0) { - if (!rad) rad = 0; const width = pw * inset; const height = ph * inset; @@ -218,7 +217,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps & const radiusRatio = borderRadius / docWidth; const radius = radiusRatio * ((2 * borderWidth) + docWidth); - const borderPath = doc && border(doc, NumCast(doc._width), NumCast(doc._height), radius, -ratio/2 ?? 0); + const borderPath = doc && border(doc, NumCast(doc._width), NumCast(doc._height), radius, -ratio/2); return !borderPath ? null : { |