fix: don't inline the font menu if more options are available (#846)

This commit is contained in:
Huang Xin
2025-04-09 11:32:24 +08:00
committed by GitHub
parent 939c7049ed
commit a26607a154
2 changed files with 1 additions and 2 deletions
@@ -190,7 +190,6 @@ const Annotator: React.FC<{ bookKey: string }> = ({ bookKey }) => {
const lineHeightValue =
parseFloat(lineHeight) || viewSettings.lineHeight * viewSettings.defaultFontSize;
const fontSizeValue = parseFloat(fontSize) || viewSettings.defaultFontSize;
console.log('style', writingMode, lineHeight, fontSize);
const strokeWidth = style === 'underline' ? 2 : 4;
const padding = (lineHeightValue - fontSizeValue - strokeWidth) / 2;
draw(Overlayer[style as keyof typeof Overlayer], { writingMode, color: hexColor, padding });