Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Jul 14, 2014
1 parent a391496 commit a9ae343
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions core-header-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
<script>

Polymer('core-header-panel', {

/**
* Fired when the content has been scrolled. `details.target` returns
* the scrollable element which you can use to access scroll info such as
* `scrollTop`.
*
* @event scroll
*/

publish: {
/**
Expand Down Expand Up @@ -168,6 +176,14 @@
return this.$.headerContent.getDistributedNodes()[0];
},

/**
* Returns the scrollable element.
*/
get scroller() {
return this.mode === 'scroll' ?
this.$.outerContainer : this.$.mainContainer;
},

scroll: function() {
var shadowMode = {'waterfall': 1, 'waterfall-tall': 1};
var noShadow = {'seamed': 1, 'cover': 1, 'scroll': 1};
Expand All @@ -189,6 +205,8 @@

header.classList.toggle('animate', tallMode[this.mode]);
}

this.fire('scroll', {target: this.scroller}, this, false);
}

});
Expand Down

1 comment on commit a9ae343

@mcollina
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please release this? It's completely out-of-sync with the doc on the website, and I had to look at the installed code to get that this is not released yet.

Please sign in to comment.