From 0a86ccc845c0adfc26b513ce558898729c58dd9d Mon Sep 17 00:00:00 2001 From: luigser Date: Tue, 26 Jan 2016 17:02:17 +0100 Subject: [PATCH] graph and datalets updates --- bower.json | 1 + bower_components/paper-scroll-header-panel/.bower.json | 20 ++++++++++---------- bower_components/paper-scroll-header-panel/.travis.yml | 22 ++++++++++++++++++++++ bower_components/paper-scroll-header-panel/CONTRIBUTING.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/README.md | 67 +++++++++++++++++++++++++++++++++++++++++++------------------------ bower_components/paper-scroll-header-panel/bower.json | 11 +++++------ bower_components/paper-scroll-header-panel/demo/drawer-panel.html | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/hide-header.html | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/images/bg1.jpg | Bin 0 -> 56901 bytes bower_components/paper-scroll-header-panel/demo/images/bg2.jpg | Bin 97102 -> 0 bytes bower_components/paper-scroll-header-panel/demo/images/bg3.jpg | Bin 80676 -> 0 bytes bower_components/paper-scroll-header-panel/demo/images/bg4.jpg | Bin 0 -> 83554 bytes bower_components/paper-scroll-header-panel/demo/index.html | 19 ++++++++++++++----- bower_components/paper-scroll-header-panel/demo/keep-header.html | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/toggle-fixed-header.html | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/transform-header-1.html | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/transform-header-2.html | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/transform-header-3.html | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/transform-header-4.html | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/transform-header-5.html | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/demo/transform-header-6.html | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------- bower_components/paper-scroll-header-panel/test/basic.html | 2 ++ bower_components/paper-scroll-header-panel/test/header-state.html | 34 +++++++++++++++++----------------- bower_components/paper-scroll-header-panel/test/index.html | 17 +++++++++-------- bower_components/paper-scroll-header-panel/test/scroll.html | 25 +++++++++++++------------ datalets/datasetexplorer-datalet/treemap_tooltip.html | 0 datalets/leafletjs-datalet/leafletjs-datalet.html | 7 +++++-- locales/paper-card-ln.js | 0 29 files changed, 1371 insertions(+), 175 deletions(-) create mode 100755 bower_components/paper-scroll-header-panel/.travis.yml create mode 100755 bower_components/paper-scroll-header-panel/CONTRIBUTING.md create mode 100755 bower_components/paper-scroll-header-panel/demo/drawer-panel.html create mode 100755 bower_components/paper-scroll-header-panel/demo/hide-header.html create mode 100755 bower_components/paper-scroll-header-panel/demo/images/bg1.jpg create mode 100755 bower_components/paper-scroll-header-panel/demo/images/bg4.jpg create mode 100755 bower_components/paper-scroll-header-panel/demo/keep-header.html create mode 100755 bower_components/paper-scroll-header-panel/demo/toggle-fixed-header.html create mode 100755 bower_components/paper-scroll-header-panel/demo/transform-header-1.html create mode 100755 bower_components/paper-scroll-header-panel/demo/transform-header-2.html create mode 100755 bower_components/paper-scroll-header-panel/demo/transform-header-3.html create mode 100755 bower_components/paper-scroll-header-panel/demo/transform-header-4.html create mode 100755 bower_components/paper-scroll-header-panel/demo/transform-header-5.html create mode 100755 bower_components/paper-scroll-header-panel/demo/transform-header-6.html mode change 100644 => 100755 datalets/datasetexplorer-datalet/treemap_tooltip.html mode change 100644 => 100755 locales/paper-card-ln.js diff --git a/bower.json b/bower.json index 06bae87..72ffe53 100755 --- a/bower.json +++ b/bower.json @@ -16,6 +16,7 @@ "dependencies": { "google-map": "GoogleWebComponents/google-map#^1.0.0", "paper-fab-transitions": "~0.1.0", + "paper-scroll-header-panel": "PolymerElements/paper-scroll-header-panel#~1.0.14", "polymer": "Polymer/polymer#^1.0.0" } } diff --git a/bower_components/paper-scroll-header-panel/.bower.json b/bower_components/paper-scroll-header-panel/.bower.json index 96247ca..7cdeb68 100755 --- a/bower_components/paper-scroll-header-panel/.bower.json +++ b/bower_components/paper-scroll-header-panel/.bower.json @@ -1,7 +1,7 @@ { "name": "paper-scroll-header-panel", "description": "A header bar with scrolling behavior", - "version": "1.0.8", + "version": "1.0.14", "license": "http://polymer.github.io/LICENSE.txt", "private": true, "authors": "The Polymer Authors", @@ -11,20 +11,18 @@ "layout", "responsive" ], - "main": [ - "paper-scroll-header-panel.html" - ], + "main": "paper-scroll-header-panel.html", "repository": { "type": "git", "url": "git://github.com/PolymerElements/paper-scroll-header-panel.git" }, "dependencies": { "polymer": "Polymer/polymer#^1.0.0", - "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0", "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0" }, "devDependencies": { "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0", "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-media-query": "PolymerElements/iron-media-query#^1.0.0", "iron-icons": "PolymerElements/iron-icons#^1.0.0", @@ -35,14 +33,16 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, + "ignore": [], "homepage": "https://github.com/PolymerElements/paper-scroll-header-panel", - "_release": "1.0.8", + "_release": "1.0.14", "_resolution": { "type": "version", - "tag": "v1.0.8", - "commit": "e1f1823fdf6e496e6ef45340d7cd5664a6a87fc9" + "tag": "v1.0.14", + "commit": "ec62c5a1d88d4e5f0f3959586ab9633110912c92" }, "_source": "git://github.com/PolymerElements/paper-scroll-header-panel.git", - "_target": "^1.0.0", - "_originalSource": "PolymerElements/paper-scroll-header-panel" + "_target": "~1.0.14", + "_originalSource": "PolymerElements/paper-scroll-header-panel", + "_direct": true } \ No newline at end of file diff --git a/bower_components/paper-scroll-header-panel/.travis.yml b/bower_components/paper-scroll-header-panel/.travis.yml new file mode 100755 index 0000000..13c3e49 --- /dev/null +++ b/bower_components/paper-scroll-header-panel/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: XFAsPXpYVWqsvZ5NX0ueW63LYhGN560ZPdFbntpau2vYIiuLKwe5N5y3pjw+zE1aJ+MV/JcW7snvP9mimdBQoKj77PLFqzo6wSozaDeV8Zx7PitkztC3rByn9WDVLO8qmlWGqFfedY24Whd4YIHAbBk7V89vaIFPZToTUm0rlUKlsaBWlhViEeG9YxmHoIUXJoRwq9pZ6enFYGIbritYlvcdMnOmTN8AJXqe2hmFel1TzE+e0z67yJdzEFBfkEgGgTAmBKpwFugFyUupOq9ZeFqoD2rg05xgfmtcUv7wrJei6/XqQ5gwbRFS+1Sbjv9AsY02hKFqmToD8a+IXjnxRB2s3OQOF/GFH70RRUeeQW+VOp9jFUaiSMdTghHhj5uMqEQPT0sxvaB+si9R8+g1cYJLaKgT3HoeJtFjcaDYwKkAiFK0ZWhL84JFbxWRqvnAf3gdgK+UWrs517amVaV0cyBjyzrIPtrgACNzJyON32sZEfuLDAKtDfpHf18rfY/QLRO/D8GjB+aWSDA2FzDe7Lrdfhrfgw/fnHq9A4ohS4swBeW8IUC5imN4Eh3FqB/GjVz6q7H0cfmxMre+b0RFCK74HroFW+or/tG5K+Tw7Z51j7NwLt8YGwyfsUDzUZpQ7jUbnW3y/5HJGHov81LkQPESZP4KxWSEYTwXnWrLKk4= + - secure: xJhCDzTM2Ud1hx17cjcMDRtI0+IzrZbvY1vYK6OhX//fP1JTatIHOsXvBVFYfHCdutib6zkKaLTi8AF3oBYdZd7BF1c8Pfv1woZtML5hKb9Ti5VdGsino8Hr0IrInCQaqE+VM+C0Jn9xbsYYMCIMvI77L8kM6HY6Qno8S3Iw99mnxZxWIOKlcwCANlOPGNxOQ3wwJITYStSniBWIwS+51yjlWL1KOhRFWi3m8tFa/eGd4dO13jUb00GPRSluzGXevhtXX78niOB53a6GLT1uObx+zsStvDJeH6HEaXzamvQFMIPtwTCIPlM90AYCaktcgrIfJeRzjG8TOsWz/DuISsRKuuZ5N+yUKp8etD1YzgR3CqQq/NqeNp8TgsKwmifLFiOv75kCvKSvDpRvNjeimwW7jI+EzM0VKewdpJGSMywhHCWTEk3qZ0Vajma6OQcV7FjpwUfheSAAs4j6vYy4/EsKcfAQ9S9eEM85yOlM2NdoNgoQsxUNSM0z01wpxP5c70bgsA3eZRSXIdPXXrd4AuyMzN/o9gkxiTSeWASE4r+OqIJfoXDXYbIH+FtGBgJAE1oPbFDolXC6HNb3C2VwsMrEJP5FMHeqy5FNqLiy0cyl4GfxzNFQz/mIPA/QOpZ80UFIfOl8ptPn2tDloV4mO9TRiE0eXHbr4UOoVH677ew= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/bower_components/paper-scroll-header-panel/CONTRIBUTING.md b/bower_components/paper-scroll-header-panel/CONTRIBUTING.md new file mode 100755 index 0000000..7b10141 --- /dev/null +++ b/bower_components/paper-scroll-header-panel/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/bower_components/paper-scroll-header-panel/README.md b/bower_components/paper-scroll-header-panel/README.md index 78f6376..71b4d19 100755 --- a/bower_components/paper-scroll-header-panel/README.md +++ b/bower_components/paper-scroll-header-panel/README.md @@ -1,20 +1,46 @@ -paper-scroll-header-panel -======================== -`paper-scroll-header-panel` contains a header section and a content section. The header is initially on the top part of the view but it scrolls away with the rest of the scrollable content. Upon scrolling slightly up at any point, the header scrolls back into view. This saves screen space and allows users to access important controls by easily moving them back to the view. + + +[![Build Status](https://travis-ci.org/PolymerElements/paper-scroll-header-panel.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-scroll-header-panel) + +_[Demo and API Docs](https://elements.polymer-project.org/elements/paper-scroll-header-panel)_ + + +##<paper-scroll-header-panel> + + +Material design: [Scrolling techniques](https://www.google.com/design/spec/patterns/scrolling-techniques.html) + +`paper-scroll-header-panel` contains a header section and a content section. The +header is initially on the top part of the view but it scrolls away with the +rest of the scrollable content. Upon scrolling slightly up at any point, the +header scrolls back into view. This saves screen space and allows users to +access important controls by easily moving them back to the view. + +__Important:__ The `paper-scroll-header-panel` will not display if its parent does not have a height. + +Using [layout classes](https://www.polymer-project.org/1.0/docs/migration.html#layout-attributes) or custom properties, you can easily make the `paper-scroll-header-panel` fill the screen ```html - Hello World! +
Hello World!
``` -or, if you would prefer to do it in CSS, just give html, body, and `paper-scroll-header-panel` a height of 100%: + +or, if you would prefer to do it in CSS, just give `html`, `body`, and `paper-scroll-header-panel` a height of 100%: + ```css html, body { height: 100%; @@ -24,7 +50,9 @@ paper-scroll-header-panel { height: 100%; } ``` -`paper-scroll-header-panel` works well with `paper-toolbar` but can use any element that represents a header by adding a `paper-header` class to it. + +`paper-scroll-header-panel` works well with `paper-toolbar` but can use any element +that represents a header by adding a `paper-header` class to it. ```html @@ -33,24 +61,15 @@ paper-scroll-header-panel { ``` -### Styling scroll-header-panel: +### Styling +======= -To change background for toolbar when it is at its full size: +The following custom properties and mixins are available for styling: -```css -paper-scroll-header-panel { - --paper-scroll-header-panel-full-header: { - background-color: red; - }; -} -``` +Custom property | Description | Default +----------------|-------------|---------- +--paper-scroll-header-panel-full-header | To change background for toolbar when it is at its full size | {} +--paper-scroll-header-panel-condensed-header | To change the background for toolbar when it is condensed | {} +--paper-scroll-header-container | To override or add container styles | {} -To change the background for toolbar when it is condensed: -```css -paper-scroll-header-panel { - --paper-scroll-header-panel-condensed-header: { - background-color: #f4b400; - }; -} -``` diff --git a/bower_components/paper-scroll-header-panel/bower.json b/bower_components/paper-scroll-header-panel/bower.json index 6488c80..b55a173 100755 --- a/bower_components/paper-scroll-header-panel/bower.json +++ b/bower_components/paper-scroll-header-panel/bower.json @@ -1,7 +1,7 @@ { "name": "paper-scroll-header-panel", "description": "A header bar with scrolling behavior", - "version": "1.0.8", + "version": "1.0.14", "license": "http://polymer.github.io/LICENSE.txt", "private": true, "authors": "The Polymer Authors", @@ -11,20 +11,18 @@ "layout", "responsive" ], - "main": [ - "paper-scroll-header-panel.html" - ], + "main": "paper-scroll-header-panel.html", "repository": { "type": "git", "url": "git://github.com/PolymerElements/paper-scroll-header-panel.git" }, "dependencies": { "polymer": "Polymer/polymer#^1.0.0", - "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0", "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0" }, "devDependencies": { "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0", "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-media-query": "PolymerElements/iron-media-query#^1.0.0", "iron-icons": "PolymerElements/iron-icons#^1.0.0", @@ -34,5 +32,6 @@ "test-fixture": "PolymerElements/test-fixture#^1.0.0", "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } + }, + "ignore": [] } diff --git a/bower_components/paper-scroll-header-panel/demo/drawer-panel.html b/bower_components/paper-scroll-header-panel/demo/drawer-panel.html new file mode 100755 index 0000000..388e6a1 --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/drawer-panel.html @@ -0,0 +1,90 @@ + + + + + paper-scroll-header-panel: Combine with paper-drawer-panel + + + + + + + + + + + + + + + + + + + + + + + + + + Menu + + + + + + + + +
Title
+ + + +
+ +
+ + + +
+ +
+ +
+ + + + + diff --git a/bower_components/paper-scroll-header-panel/demo/hide-header.html b/bower_components/paper-scroll-header-panel/demo/hide-header.html new file mode 100755 index 0000000..ec7debe --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/hide-header.html @@ -0,0 +1,88 @@ + + + + + paper-scroll-header-panel: demo3 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + + +
+ +
+ + + diff --git a/bower_components/paper-scroll-header-panel/demo/images/bg1.jpg b/bower_components/paper-scroll-header-panel/demo/images/bg1.jpg new file mode 100755 index 0000000..3d8ebf1 Binary files /dev/null and b/bower_components/paper-scroll-header-panel/demo/images/bg1.jpg differ diff --git a/bower_components/paper-scroll-header-panel/demo/images/bg2.jpg b/bower_components/paper-scroll-header-panel/demo/images/bg2.jpg index 9aad0a9..a347ac1 100755 Binary files a/bower_components/paper-scroll-header-panel/demo/images/bg2.jpg and b/bower_components/paper-scroll-header-panel/demo/images/bg2.jpg differ diff --git a/bower_components/paper-scroll-header-panel/demo/images/bg3.jpg b/bower_components/paper-scroll-header-panel/demo/images/bg3.jpg index 5079b4e..9463bc3 100755 Binary files a/bower_components/paper-scroll-header-panel/demo/images/bg3.jpg and b/bower_components/paper-scroll-header-panel/demo/images/bg3.jpg differ diff --git a/bower_components/paper-scroll-header-panel/demo/images/bg4.jpg b/bower_components/paper-scroll-header-panel/demo/images/bg4.jpg new file mode 100755 index 0000000..0300e0e Binary files /dev/null and b/bower_components/paper-scroll-header-panel/demo/images/bg4.jpg differ diff --git a/bower_components/paper-scroll-header-panel/demo/index.html b/bower_components/paper-scroll-header-panel/demo/index.html index 71611c9..a2c35ba 100755 --- a/bower_components/paper-scroll-header-panel/demo/index.html +++ b/bower_components/paper-scroll-header-panel/demo/index.html @@ -22,6 +22,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + @@ -38,15 +40,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN /* background for toolbar when it is at its full size */ --paper-scroll-header-panel-full-header: { - background-image: url(images/bg6.jpg); + background-image: url(images/bg1.jpg); + background-position: left center; }; /* background for toolbar when it is condensed */ --paper-scroll-header-panel-condensed-header: { - background-color: var(--paper-deep-orange-500, #ff5722); + background-color: var(--paper-deep-purple-500); }; } + paper-icon-button { + --paper-icon-button-ink-color: white; + } + paper-toolbar.tall { background-color: transparent; } @@ -63,6 +70,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN padding: 8px; } + .spacer { + @apply(--layout-flex); + } + @@ -71,13 +82,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - -
+
Title
-
diff --git a/bower_components/paper-scroll-header-panel/demo/keep-header.html b/bower_components/paper-scroll-header-panel/demo/keep-header.html new file mode 100755 index 0000000..9fde31a --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/keep-header.html @@ -0,0 +1,86 @@ + + + + + paper-scroll-header-panel: demo1 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Title
+ + + +
+ +
+ + + +
+ +
+ + + diff --git a/bower_components/paper-scroll-header-panel/demo/toggle-fixed-header.html b/bower_components/paper-scroll-header-panel/demo/toggle-fixed-header.html new file mode 100755 index 0000000..dd27d79 --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/toggle-fixed-header.html @@ -0,0 +1,130 @@ + + + + + paper-scroll-header-panel: demo7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
Title
+ +
+ +
+ +

Resize window to toggle between fixed header and scrolled header

+ + +
+ +
+ + + + + + + diff --git a/bower_components/paper-scroll-header-panel/demo/transform-header-1.html b/bower_components/paper-scroll-header-panel/demo/transform-header-1.html new file mode 100755 index 0000000..e5acabc --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/transform-header-1.html @@ -0,0 +1,118 @@ + + + + + paper-scroll-header-panel: Transform header + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
Title
+ +
+ +
+ + + +
+ +
+ + + + + diff --git a/bower_components/paper-scroll-header-panel/demo/transform-header-2.html b/bower_components/paper-scroll-header-panel/demo/transform-header-2.html new file mode 100755 index 0000000..dda602d --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/transform-header-2.html @@ -0,0 +1,84 @@ + + + + + paper-scroll-header-panel: transform header + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Title
+ +
+ +
+ + + +
+ +
+ + + diff --git a/bower_components/paper-scroll-header-panel/demo/transform-header-3.html b/bower_components/paper-scroll-header-panel/demo/transform-header-3.html new file mode 100755 index 0000000..9cf2e19 --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/transform-header-3.html @@ -0,0 +1,116 @@ + + + + + paper-scroll-header-panel: transform header + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
Title
+ +
+ +
+ + + +
+ +
+ + + + + diff --git a/bower_components/paper-scroll-header-panel/demo/transform-header-4.html b/bower_components/paper-scroll-header-panel/demo/transform-header-4.html new file mode 100755 index 0000000..daef1b6 --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/transform-header-4.html @@ -0,0 +1,119 @@ + + + + + paper-scroll-header-panel: transform header + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
Title
+ +
+ +
+ + + +
+ +
+ + + + + diff --git a/bower_components/paper-scroll-header-panel/demo/transform-header-5.html b/bower_components/paper-scroll-header-panel/demo/transform-header-5.html new file mode 100755 index 0000000..4dded33 --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/transform-header-5.html @@ -0,0 +1,131 @@ + + + + + paper-scroll-header-panel: transform header + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
Lorem ipsum dolor sit amet
+
Iisque perfecto dissentiet cum et
+
+ + +
+ +
+ + + +
+ +
+ + + diff --git a/bower_components/paper-scroll-header-panel/demo/transform-header-6.html b/bower_components/paper-scroll-header-panel/demo/transform-header-6.html new file mode 100755 index 0000000..ce31080 --- /dev/null +++ b/bower_components/paper-scroll-header-panel/demo/transform-header-6.html @@ -0,0 +1,120 @@ + + + + + paper-scroll-header-panel: transform header + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + diff --git a/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html b/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html index af41b82..b2c8940 100755 --- a/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html +++ b/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html @@ -12,6 +12,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN @@ -90,11 +100,12 @@ To change the background for toolbar when it is condensed: -moz-box-sizing: border-box; box-sizing: border-box; - -webkit-overflow-scrolling: touch; overflow-x: hidden; overflow-y: auto; + + @apply(--paper-scroll-header-container); } #headerContainer { @@ -155,7 +166,7 @@ To change the background for toolbar when it is condensed: 'use strict'; - Polymer({ + Polymer.PaperScrollHeaderPanel = Polymer({ /** * Fired when the content has been scrolled. @@ -252,24 +263,17 @@ To change the background for toolbar when it is condensed: }, /** - * The state of the header. The initial value is `HEADER_STATE_EXPANDED`. - * Depending on the configuration and the `scrollTop` value, + * The state of the header. Depending on the configuration and the `scrollTop` value, * the header state could change to - * `HEADER_STATE_HIDDEN`, `HEADER_STATE_CONDENSED` and `HEADER_STATE_INTERPOLATED` + * Polymer.PaperScrollHeaderPanel.HEADER_STATE_EXPANDED + * Polymer.PaperScrollHeaderPanel.HEADER_STATE_HIDDEN + * Polymer.PaperScrollHeaderPanel.HEADER_STATE_CONDENSED + * Polymer.PaperScrollHeaderPanel.HEADER_STATE_INTERPOLATED */ headerState: { type: Number, readOnly: true, - value: 0 - }, - - _prevScrollTop: { - type: Number, - value: 0 - }, - - _y: { - type: Number, + notify:true, value: 0 }, @@ -292,43 +296,13 @@ To change the background for toolbar when it is condensed: }, ready: function() { - this.async(this.measureHeaderHeight, 5); this._scrollHandler = this._scroll.bind(this); this.scroller.addEventListener('scroll', this._scrollHandler); }, - /** - * The header's initial state - * - * @property HEADER_STATE_EXPANDED - * @type number - */ - HEADER_STATE_EXPANDED: 0, - - /** - * The header's state when it's hidden. - * - * @property HEADER_STATE_HIDDEN - * @type number - */ - HEADER_STATE_HIDDEN: 1, - - /** - * The header's state when it's condensed. - * - * @property HEADER_STATE_CONDENSED - * @type number - */ - HEADER_STATE_CONDENSED: 2, - - /** - * The header's state when its progress is somewhere between - * the `hidden` and `condensed` state. - * - * @property HEADER_STATE_INTERPOLATED - * @type number - */ - HEADER_STATE_INTERPOLATED: 3, + attached: function() { + this.async(this.measureHeaderHeight, 1); + }, /** * Returns the header element. @@ -393,7 +367,7 @@ To change the background for toolbar when it is condensed: * @param {boolean} smooth true if the scroll position should be smoothly adjusted. */ scroll: function(top, smooth) { - // the scroll event will trigger _updateScrollState directly, + // the scroll event will trigger _updateScrollState directly, // However, _updateScrollState relies on the previous `scrollTop` to update the states. // Calling _updateScrollState will ensure that the states are synced correctly. @@ -439,13 +413,14 @@ To change the background for toolbar when it is condensed: * @param {boolean} smooth true if the scroll position should be smoothly adjusted. */ condense: function(smooth) { + var ctx = Polymer.PaperScrollHeaderPanel; if (this.condenses && !this.fixed && !this.noReveal) { switch (this.headerState) { - case this.HEADER_STATE_HIDDEN: + case ctx.HEADER_STATE_HIDDEN: this.scroll(this.scroller.scrollTop - (this._headerMaxDelta - this._headerMargin), smooth); break; - case this.HEADER_STATE_EXPANDED: - case this.HEADER_STATE_INTERPOLATED: + case ctx.HEADER_STATE_EXPANDED: + case ctx.HEADER_STATE_INTERPOLATED: this.scroll(this._headerMargin, smooth); break; } @@ -564,22 +539,27 @@ To change the background for toolbar when it is condensed: }, _updateScrollState: function(scrollTop) { + var ctx = Polymer.PaperScrollHeaderPanel; var deltaScrollTop = scrollTop - this._prevScrollTop; var y = Math.max(0, (this.noReveal) ? scrollTop : this._y + deltaScrollTop); if (y > this._headerMaxDelta) { y = this._headerMaxDelta; - this._setHeaderState(this.HEADER_STATE_HIDDEN); - } else if (this.condenses && this._prevScrollTop >= scrollTop && scrollTop >= this._headerMargin) { + if (this.keepCondensedHeader) { + this._setHeaderState(ctx.HEADER_STATE_CONDENSED); + } else { + this._setHeaderState(ctx.HEADER_STATE_HIDDEN); + } + } else if (this.condenses && scrollTop >= this._headerMargin) { y = Math.max(y, this._headerMargin); - this._setHeaderState(this.HEADER_STATE_CONDENSED); + this._setHeaderState(ctx.HEADER_STATE_CONDENSED); } else if (y === 0) { - this._setHeaderState(this.HEADER_STATE_EXPANDED); + this._setHeaderState(ctx.HEADER_STATE_EXPANDED); } else { - this._setHeaderState(this.HEADER_STATE_INTERPOLATED); + this._setHeaderState(ctx.HEADER_STATE_INTERPOLATED); } if (!this.fixed && y !== this._y) { @@ -591,6 +571,11 @@ To change the background for toolbar when it is condensed: } }); + Polymer.PaperScrollHeaderPanel.HEADER_STATE_EXPANDED = 0; + Polymer.PaperScrollHeaderPanel.HEADER_STATE_HIDDEN = 1; + Polymer.PaperScrollHeaderPanel.HEADER_STATE_CONDENSED = 2; + Polymer.PaperScrollHeaderPanel.HEADER_STATE_INTERPOLATED = 3; + })(); diff --git a/bower_components/paper-scroll-header-panel/test/basic.html b/bower_components/paper-scroll-header-panel/test/basic.html index bb82900..a399ff7 100755 --- a/bower_components/paper-scroll-header-panel/test/basic.html +++ b/bower_components/paper-scroll-header-panel/test/basic.html @@ -58,6 +58,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN assert.typeOf(scrollHeaderPanel.scroller, 'object'); assert.equal(scrollHeaderPanel.keepCondensedHeader, false); assert.equal(scrollHeaderPanel.keepCondensedHeader, false); + + scrollHeaderPanel.measureHeaderHeight(); assert.equal(scrollHeaderPanel.headerHeight, toolbar.offsetHeight); assert.equal(scrollHeaderPanel.condensedHeaderHeight, Math.round(toolbar.offsetHeight * 1/3)); }); diff --git a/bower_components/paper-scroll-header-panel/test/header-state.html b/bower_components/paper-scroll-header-panel/test/header-state.html index 38f96ba..d6da0de 100755 --- a/bower_components/paper-scroll-header-panel/test/header-state.html +++ b/bower_components/paper-scroll-header-panel/test/header-state.html @@ -28,8 +28,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN