Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

Commit 9241b1f

Browse files
authored
Merge pull request #31 from PolymerElements/auto-cleanup-pin-travis-node-9
Automatic cleanup!
2 parents 37e7c19 + e11881e commit 9241b1f

File tree

8 files changed

+1909
-283
lines changed

8 files changed

+1909
-283
lines changed

.travis.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
language: node_js
2-
sudo: required
2+
sudo: 'false'
33
before_script:
4-
- npm install -g bower polylint web-component-tester
5-
- bower install
6-
- polylint
4+
- npm install -g polymer-cli
5+
- polymer install --variants
76
- >-
87
npm run update-types && git diff --exit-code || (echo -e
98
'\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
109
update-types".' && false)
10+
- >-
11+
npm run format && git diff --exit-code || (echo -e '\n\033[31mERROR:\033[0m
12+
Project is not formatted. Please run "npm run format".' && false)
1113
env:
1214
global:
1315
- secure: >-
14-
WxlVbCDRxgNgvyoakDC4HiyUQB/oz3Oy1mvr6vJqGgnV7U1xC89y5FbQsUq27DthHAa5aqumEzZR3PCMzAJ8q/XdK7kbGC1f3KxSGrpVNtJFq7my3UzjWT0OkwXuIOWouio//CGVao3Z0Xp5FQlzQVoZJYo2HIZ8n2SRn7XY9xFBiU/lOPc/EKo5Q7f7Ox4IxNMMPSwT3JuNTeqJXi5c6Uy2GfWA1QkdieJUzSr/kPykiB5ng1rR7MZcNZpmjLVKIq+zcLWV6bWyd6UDK8ySuOgAq56i9ctMburN42anzjdAtPsPBm03F+CdOtDuYS+jHRvpROUkcNAWWt+6GHIj4J/cJ4prHv6nwX9Ta8COCiYpWV7BzgIcpF3j4IuzWKIJUbWhBZCVx3mzqcauHQDL1AvyxQX4gHi5LqUcHGEq0udxMkfnY8xu4p43yApSkOSPzG+9zLo9JU7BvNAy24b+84wf3oKukdltkAlXIEjI/32ddEXjnPDVQH8CMiseUMlht+97itgxOtgRLVP27oBummumy7W81PY1VvT9pjkZUD1xqIf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G9uFR6sIRMlY1dGxxrFItfgnF+yKtkTyDE9jb5kV19gPSU4I=
19+
node_js: '9'
1820
addons:
1921
firefox: latest
20-
apt:
21-
sources:
22-
- google-chrome
23-
packages:
24-
- google-chrome-stable
22+
chrome: stable
2523
script:
26-
- xvfb-run wct
27-
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s ''default''; fi'
24+
- xvfb-run polymer test
25+
- >-
26+
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s 'default';
27+
fi
2828
dist: trusty
29+
cache:
30+
directories:
31+
- node_modules

iron-swipeable-container.html

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
</dom-module>
6666

6767
<script>
68-
6968
Polymer({
7069
is: 'iron-swipeable-container',
7170

@@ -81,48 +80,33 @@
8180
* options are `curve | horizontal`. If left unspecified, the default
8281
* is assumed to be `horizontal`.
8382
*/
84-
swipeStyle: {
85-
type: String,
86-
value: 'horizontal'
87-
},
83+
swipeStyle: {type: String, value: 'horizontal'},
8884

8985
/**
9086
* If true, then the container will not allow swiping.
9187
*/
92-
disabled: {
93-
type: Boolean,
94-
value: false
95-
},
88+
disabled: {type: Boolean, value: false},
9689

9790
/**
9891
* The ratio of the width of the element that the translation animation
9992
* should happen over. For example, if the `widthRatio` is 3, the
10093
* animation will take place on a distance 3 times the width of the
10194
* element being swiped.
10295
*/
103-
widthRatio: {
104-
type: Number,
105-
value: 3
106-
},
96+
widthRatio: {type: Number, value: 3},
10797

10898
/**
10999
* The ratio of the total animation distance after which the opacity
110100
* transformation begins. For example, if the `widthRatio` is 1 and
111101
* the `opacityRate` is 0.5, then the element needs to travel half its
112102
* width before its opacity starts decreasing.
113103
*/
114-
opacityRate: {
115-
type: Number,
116-
value: 0.2
117-
},
104+
opacityRate: {type: Number, value: 0.2},
118105

119106
/**
120107
* The CSS transition applied while swiping.
121108
*/
122-
transition: {
123-
type: String,
124-
value: '300ms cubic-bezier(0.4, 0.0, 1, 1)'
125-
}
109+
transition: {type: String, value: '300ms cubic-bezier(0.4, 0.0, 1, 1)'}
126110
},
127111

128112
ready: function() {
@@ -132,8 +116,8 @@
132116
},
133117

134118
attached: function() {
135-
this._nodeObserver = Polymer.dom(this.$.content).observeNodes(
136-
function(mutations) {
119+
this._nodeObserver =
120+
Polymer.dom(this.$.content).observeNodes(function(mutations) {
137121
for (var i = 0; i < mutations.addedNodes.length; i++) {
138122
this._addListeners(mutations.addedNodes[i]);
139123
}
@@ -214,7 +198,8 @@
214198
// Opacity distance overflow. `this._nodeWidth * this.opacityRate` is the
215199
// total distance the element needs to travel to become completely
216200
// transparent, and `x` is how much the element has already travelled.
217-
var opaqueDistance = Math.max(0, Math.abs(x) - this._nodeWidth * this.opacityRate);
201+
var opaqueDistance =
202+
Math.max(0, Math.abs(x) - this._nodeWidth * this.opacityRate);
218203
var opacity = Math.max(0, (totalDistance - opaqueDistance) / totalDistance);
219204
target.style.opacity = opacity;
220205

@@ -227,7 +212,9 @@
227212
// Assume the element will be completely transparent at 90 degrees, so
228213
// figure out the rotation and vertical displacement needed to
229214
// achieve that.
230-
var y = totalDistance - Math.sqrt(totalDistance * totalDistance - opaqueDistance * opaqueDistance);
215+
var y = totalDistance -
216+
Math.sqrt(
217+
totalDistance * totalDistance - opaqueDistance * opaqueDistance);
231218
var deg = (1 - opacity) * direction * 90;
232219

233220
translate = 'translate3d(' + x + 'px,' + y + 'px,0)';
@@ -242,8 +229,8 @@
242229
target.style.transition = this.transition;
243230

244231
if (this._swipeComplete) {
245-
// If the element is ready to be swiped away, then translate it to the full
246-
// transparency distance.
232+
// If the element is ready to be swiped away, then translate it to the
233+
// full transparency distance.
247234
var totalDistance = this._nodeWidth * this.widthRatio;
248235
this._animate(this._direction ? totalDistance : -totalDistance, target);
249236
} else {
@@ -256,10 +243,9 @@
256243

257244
if (this._swipeComplete && event.propertyName === 'opacity') {
258245
Polymer.dom(this).removeChild(target);
259-
this.fire('iron-swipe',
260-
{ direction: this._direction > 0 ? 'right' : 'left',
261-
target:target
262-
});
246+
this.fire(
247+
'iron-swipe',
248+
{direction: this._direction > 0 ? 'right' : 'left', target: target});
263249
}
264250
}
265251

0 commit comments

Comments
 (0)