Line Wrap description text in a compilationTemplate's relatedContent area in TVML

流过昼夜 提交于 2019-12-13 01:13:58

问题


How can I wrap the description text in the relatedContent area of a compilationTemplate?

My description tag:

<description style="tv-text-style: none; font-size:36; font-weight:regular; word-wrap:break-word;">lorem ipsum dolor sit amet consectetur adipiscing elit</description>

Full template:

var Template = function() { return `<?xml version="1.0" encoding="UTF-8" ?>
    <document>
        <compilationTemplate theme="light">
            <list>
                <relatedContent>
                    <itemBanner>
                        <heroImg src="${this.BASEURL}images/shows/bates/BRANDHD2398_AEN_BATE_168121_TVE_000_2398_60_20160303_00_S3_REV_HD_1920x1080-16x9.jpg" />
                        <description style="tv-text-style: none; font-size:36; font-weight:regular; word-wrap:break-word;">lorem ipsum dolor sit amet consectetur adipiscing elit</description>
                    </itemBanner>
                </relatedContent>
                <header>
                    <title>Bates Motel</title>
                    <subtitle>Season 4</subtitle>
                </header>
                <section>
                    <listItemLockup>
                        <ordinal minLength="2">1</ordinal>
                        <title>A Danger to Himself and Others</title>
                        <decorationLabel>11:14</decorationLabel>
                    </listItemLockup>
                    < !-- ... -- >
                </section>
            </list>
        </compilationTemplate>
    </document>`
}

The text size changes, but the description truncates instead of wrapping to the next line.


回答1:


Modify pre-defined description area with min-height, max-height styles? with tv-text-max-lines. Example in https://github.com/iBaa/PlexConnectApp/blob/master/PlexConnectApp/TVMLTemplates/Fanart/Movie_PrePlay.xml, see class description and later usage.

(Edited 14Apr16 based on comment and double-check)



来源:https://stackoverflow.com/questions/36556752/line-wrap-description-text-in-a-compilationtemplates-relatedcontent-area-in-tvm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!