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

Commit

Permalink
Add CoreResizable support.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Dec 3, 2014
1 parent 18603cc commit 04713eb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"core-icon-button": "Polymer/core-icon-button#master",
"core-input": "Polymer/core-input#master",
"core-media-query": "Polymer/core-media-query#master",
"core-toolbar": "Polymer/core-toolbar#master"
"core-toolbar": "Polymer/core-toolbar#master",
"core-resizable": "Polymer/core-resizable#master"
}
}
16 changes: 13 additions & 3 deletions core-scroll-header-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
-->

<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../core-resizable/core-resizable.html">

<polymer-element name="core-scroll-header-panel">
<template>
Expand Down Expand Up @@ -77,7 +78,7 @@
<script>
(function() {

Polymer('core-scroll-header-panel', {
Polymer(Polymer.mixin({

/**
* Fired when the content has been scrolled.
Expand Down Expand Up @@ -184,14 +185,23 @@
observe: {
'headerMargin fixed': 'setup'
},


eventDelegates: {
'core-resize': 'measureHeaderHeight'
},

attached: function() {
this.resizeableAttachedHandler();
},

ready: function() {
this._scrollHandler = this.scroll.bind(this);
this.scroller.addEventListener('scroll', this._scrollHandler);
},

detached: function() {
this.scroller.removeEventListener('scroll', this._scrollHandler);
this.resizeableDetachedHandler();
},

domReady: function() {
Expand Down Expand Up @@ -330,7 +340,7 @@
}
}

});
}, Polymer.CoreResizable));

//determine proper transform mechanizm
if (document.documentElement.style.transform !== undefined) {
Expand Down

0 comments on commit 04713eb

Please sign in to comment.