2015-12-21 48 views

回答

3

原因:紙滾動集管面板時首次加載它計算報頭高度。然後它只聽鐵調整事件。但霓虹燈動畫頁面切換頁面時不會觸發熨燙大小事件。 從https://github.com/PolymerElements/paper-scroll-header-panel/blob/master/paper-scroll-header-panel.html。行號230

* By default, the height will be measured when it is ready. If the height 
     * changes later the user needs to either set this value to reflect the 
     * new height or invoke `measureHeaderHeight()`. 

解決方案:我已經通過調用第二紙渦卷集管板的measureHeaderHeight()方法明確地解決了這個問題。檢查此http://jsbin.com/visazasena/edit?html,output

Polymer({ 
    is: "inbox-view", 

    next_page: function() { 
    document.querySelector("#main-page").selected = 1; 
    } 

}); 

更改這

Polymer({ 
    is: "inbox-view", 

    next_page: function() { 
    document.querySelector("#main-page").selected = 1; 
    document.querySelector("#panel").measureHeaderHeight(); 

    } 
}); 
+1

document.querySelector(「專利視圖紙滾動集管面板」)火(「鐵調整大小」)。 –

+0

這也應該起作用。 – tkay