diff options
Diffstat (limited to 'frontend/app/views/tile')
| -rw-r--r-- | frontend/app/views/tile/handles/tile.text.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/frontend/app/views/tile/handles/tile.text.js b/frontend/app/views/tile/handles/tile.text.js index 46d285d..c747957 100644 --- a/frontend/app/views/tile/handles/tile.text.js +++ b/frontend/app/views/tile/handles/tile.text.js @@ -2,6 +2,8 @@ import React from 'react' import { generateTransform, unitsDimension, hexToRgb, pickCursor } from 'app/views/tile/tile.utils' import Marquee from "react-fast-marquee" +import { isMobile } from 'app/utils' + const VERTICAL_MARQUEE_DIRECTION = { up: "left", down: "right", @@ -28,13 +30,17 @@ export default function TileText({ tile, box, bounds, videoBounds, cursors, view style.cursor = cursorStyle } - + let { font_size } = tile.settings + if (isMobile) { + font_size *= 0.75 + } + let content = <span dangerouslySetInnerHTML={{ __html: tile.settings.content }} /> className += ' ' + tile.settings.align style.width = unitsDimension(tile, 'width', bounds, videoBounds) style.height = unitsDimension(tile, 'height', bounds, videoBounds) style.fontFamily = tile.settings.font_family - style.fontSize = tile.settings.font_size + 'px' + style.fontSize = font_size + 'px' style.lineHeight = 1.5 style.fontWeight = (tile.settings.font_style || "").indexOf('bold') !== -1 ? 'bold' : 'normal' style.fontStyle = (tile.settings.font_style || "").indexOf('italic') !== -1 ? 'italic' : 'normal' |
