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

Commit

Permalink
remove whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Sep 2, 2014
1 parent 29650b6 commit 3ca54a0
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions core-header-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<div>Content goes here...</div>
</core-header-panel>
If you want to use other than `core-toolbar` for the header, add
If you want to use other than `core-toolbar` for the header, add
`core-header` class to that element.
Example:
Expand All @@ -51,7 +51,7 @@
<div class="core-header">Header</div>
<div>Content goes here...</div>
</core-header-panel>
To have the content fits to the main area, use `fit` attribute.
<core-header-panel>
Expand All @@ -72,19 +72,19 @@
<template>

<link rel="stylesheet" href="core-header-panel.css">

<div id="outerContainer" on-scroll="{{scroll}}" vertical layout>

<content id="headerContent" select="core-toolbar, .core-header"></content>

<div id="mainPanel" flex vertical layout>

<div id="mainContainer" flex?="{{mode !== 'cover'}}" on-scroll="{{scroll}}">
<content id="mainContent" select="*"></content>
</div>

<div id="dropShadow"></div>

</div>

</div>
Expand All @@ -93,7 +93,7 @@
<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
Expand All @@ -105,20 +105,20 @@
publish: {
/**
* Controls header and scrolling behavior. Options are
* `standard`, `seamed`, `waterfall`, `waterfall-tall`,
* `standard`, `seamed`, `waterfall`, `waterfall-tall`,
* `waterfall-medium-tall`, `scroll` and `cover`.
* Default is `standard`.
*
* `standard`: The header is a step above the panel. The header will consume the
* panel at the point of entry, preventing it from passing through to the
* `standard`: The header is a step above the panel. The header will consume the
* panel at the point of entry, preventing it from passing through to the
* opposite side.
*
* `seamed`: The header is presented as seamed with the panel.
*
* `waterfall`: Similar to standard mode, but header is initially presented as
* `waterfall`: Similar to standard mode, but header is initially presented as
* seamed with panel, but then separates to form the step.
*
* `waterfall-tall`: The header is initially taller (`tall` class is added to
* `waterfall-tall`: The header is initially taller (`tall` class is added to
* the header). As the user scrolls, the header separates (forming an edge)
* while condensing (`tall` class is removed from the header).
*
Expand All @@ -136,7 +136,7 @@
* margin: 60px 60px 60px 0;
* }
* </style>
*
*
* <core-header-panel mode="cover">
* <core-appbar class="tall">
* <core-icon-button icon="menu"></core-icon-button>
Expand All @@ -149,7 +149,7 @@
* @default ''
*/
mode: {value: '', reflect: true},

/**
* The class used in waterfall-tall mode. Change this if the header
* accepts a different class for toggling height, e.g. "medium-tall"
Expand All @@ -159,7 +159,7 @@
* @default 'tall'
*/
tallClass: 'tall',

/**
* If true, the drop-shadow is always shown no matter what mode is set to.
*
Expand All @@ -169,15 +169,15 @@
*/
shadow: false
},

animateDuration: 180,

modeConfigs: {
shadowMode: {'waterfall': 1, 'waterfall-tall': 1},
noShadow: {'seamed': 1, 'cover': 1, 'scroll': 1},
tallMode: {'waterfall-tall': 1}
},

domReady: function() {
this.async('scroll');
},
Expand All @@ -203,38 +203,38 @@
get header() {
return this.$.headerContent.getDistributedNodes()[0];
},

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

scroll: function() {
var configs = this.modeConfigs;
var main = this.$.mainContainer;
var header = this.header;

var sTop = main.scrollTop;
var atTop = sTop === 0;

this.$.dropShadow.classList.toggle('hidden', !this.shadow &&
(atTop && configs.shadowMode[this.mode] || configs.noShadow[this.mode]));

if (header && configs.tallMode[this.mode]) {
header.classList.toggle(this.tallClass, atTop ||
header.classList.contains(this.tallClass) &&
header.classList.contains(this.tallClass) &&
main.scrollHeight < this.$.outerContainer.offsetHeight);
}

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

});

</script>
Expand Down

0 comments on commit 3ca54a0

Please sign in to comment.