如何更改纸卷轴标题面板的断点

时间:2016-02-02 20:57:02

标签: javascript html5 polymer

请参阅下面的示例代码。

现在,当我在纵向模式下将显示尺寸更改为智能手机时,第一个paper-scroll-header-panel仅折叠(并转换为汉堡包菜单)。

我希望它早点崩溃,但似乎无法找到如何做到这一点。

如何更改崩溃断点?

<paper-drawer-panel id="paperDrawerPanel">

    <paper-scroll-header-panel drawer fixed>

        <paper-toolbar>
            <span class="paper-font-title"><spring:message code="appTitle" /></span>
        </paper-toolbar>

        <paper-menu class="list" attr-for-selected="data-route" selected="{{route}}" on-iron-select="onMenuSelect"> 
            <paper-item><a data-route="home" href="/home"> <iron-icon icon="home"></iron-icon> <span>Home</span></a></paper-item>
            <paper-item><a data-route="page1" href="/page1"> <iron-icon icon="mail"></iron-icon> <span>Page 1</span></a></paper-item>
            <paper-item><a href="/logout"> <iron-icon icon="verified-user"></iron-icon> <span>Log out</span></a></paper-item>
        </paper-menu>

        <div>Drawer content...</div>
    </paper-scroll-header-panel>

    <paper-scroll-header-panel main condenses keep-condensed-header>

        <paper-icon-button id="paperToggle" icon="menu" paper-drawer-toggle></paper-icon-button>

        <paper-toolbar id="mainToolbar" justify="justified">
            <a href="#">Link 1</a>
            <a href="#">Link 2</a>
            <a href="#">Link 3</a>
        </paper-toolbar>

        <iron-pages attr-for-selected="data-route" selected="{{route}}">
            <section data-route="home">
                <main-view></main-view>
            </section>
            <section data-route="page1">
                <x-page></x-page>
            </section>
        </iron-pages>

    </paper-scroll-header-panel>
</paper-drawer-panel>

1 个答案:

答案 0 :(得分:2)

paper-drawer-panel的{​​{3}}属性可用于控制菜单折叠的屏幕宽度。目前设置为600px。

更新:responsiveWidth属性可用于一直折叠菜单。

<paper-drawer-panel force-narrow></paper-drawer-panel>