polymer-paper-elements-rails 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +51 -0
- data/Rakefile +1 -0
- data/app/assets/components/iron-a11y-announcer/iron-a11y-announcer.html +125 -0
- data/app/assets/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html +418 -0
- data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
- data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
- data/app/assets/components/iron-behaviors/iron-button-state.html +195 -0
- data/app/assets/components/iron-behaviors/iron-control-state.html +102 -0
- data/app/assets/components/iron-fit-behavior/iron-fit-behavior.html +230 -0
- data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
- data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
- data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
- data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
- data/app/assets/components/iron-icon/hero.svg +19 -0
- data/app/assets/components/iron-icon/iron-icon.html +187 -0
- data/app/assets/components/iron-icons/av-icons.html +73 -0
- data/app/assets/components/iron-icons/communication-icons.html +59 -0
- data/app/assets/components/iron-icons/device-icons.html +94 -0
- data/app/assets/components/iron-icons/editor-icons.html +70 -0
- data/app/assets/components/iron-icons/hardware-icons.html +61 -0
- data/app/assets/components/iron-icons/hero.svg +35 -0
- data/app/assets/components/iron-icons/image-icons.html +164 -0
- data/app/assets/components/iron-icons/iron-icons.html +303 -0
- data/app/assets/components/iron-icons/maps-icons.html +71 -0
- data/app/assets/components/iron-icons/notification-icons.html +62 -0
- data/app/assets/components/iron-icons/social-icons.html +40 -0
- data/app/assets/components/iron-iconset-svg/iron-iconset-svg.html +191 -0
- data/app/assets/components/iron-input/hero.svg +19 -0
- data/app/assets/components/iron-input/iron-input.html +235 -0
- data/app/assets/components/iron-media-query/hero.svg +29 -0
- data/app/assets/components/iron-media-query/iron-media-query.html +84 -0
- data/app/assets/components/iron-menu-behavior/iron-menu-behavior.html +214 -0
- data/app/assets/components/iron-menu-behavior/iron-menubar-behavior.html +65 -0
- data/app/assets/components/iron-meta/hero.svg +33 -0
- data/app/assets/components/iron-meta/iron-meta.html +352 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-backdrop.html +132 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-behavior.html +432 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-manager.html +107 -0
- data/app/assets/components/iron-range-behavior/iron-range-behavior.html +101 -0
- data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
- data/app/assets/components/iron-selector/iron-multi-selectable.html +120 -0
- data/app/assets/components/iron-selector/iron-selectable.html +307 -0
- data/app/assets/components/iron-selector/iron-selection.html +115 -0
- data/app/assets/components/iron-selector/iron-selector.html +71 -0
- data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +100 -0
- data/app/assets/components/neon-animation/animations/cascaded-animation.html +84 -0
- data/app/assets/components/neon-animation/animations/fade-in-animation.html +49 -0
- data/app/assets/components/neon-animation/animations/fade-out-animation.html +49 -0
- data/app/assets/components/neon-animation/animations/hero-animation.html +83 -0
- data/app/assets/components/neon-animation/animations/opaque-animation.html +46 -0
- data/app/assets/components/neon-animation/animations/ripple-animation.html +92 -0
- data/app/assets/components/neon-animation/animations/scale-down-animation.html +65 -0
- data/app/assets/components/neon-animation/animations/scale-up-animation.html +58 -0
- data/app/assets/components/neon-animation/animations/slide-down-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-from-left-animation.html +60 -0
- data/app/assets/components/neon-animation/animations/slide-from-right-animation.html +60 -0
- data/app/assets/components/neon-animation/animations/slide-left-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-right-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-up-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/transform-animation.html +61 -0
- data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
- data/app/assets/components/neon-animation/neon-animatable-behavior.html +156 -0
- data/app/assets/components/neon-animation/neon-animatable.html +54 -0
- data/app/assets/components/neon-animation/neon-animated-pages.html +208 -0
- data/app/assets/components/neon-animation/neon-animation-behavior.html +88 -0
- data/app/assets/components/neon-animation/neon-animation-runner-behavior.html +110 -0
- data/app/assets/components/neon-animation/neon-animation.html +17 -0
- data/app/assets/components/neon-animation/neon-animations.html +25 -0
- data/app/assets/components/neon-animation/neon-shared-element-animatable-behavior.html +37 -0
- data/app/assets/components/neon-animation/neon-shared-element-animation-behavior.html +66 -0
- data/app/assets/components/neon-animation/web-animations.html +11 -0
- data/app/assets/components/paper-behaviors/paper-button-behavior.html +55 -0
- data/app/assets/components/paper-behaviors/paper-inky-focus-behavior.html +44 -0
- data/app/assets/components/paper-button/paper-button.html +177 -0
- data/app/assets/components/paper-checkbox/metadata.html +17 -0
- data/app/assets/components/paper-checkbox/paper-checkbox.css +149 -0
- data/app/assets/components/paper-checkbox/paper-checkbox.html +163 -0
- data/app/assets/components/paper-dialog-behavior/hero.svg +51 -0
- data/app/assets/components/paper-dialog-behavior/paper-dialog-behavior.html +236 -0
- data/app/assets/components/paper-dialog-behavior/paper-dialog-common.css +58 -0
- data/app/assets/components/paper-dialog-scrollable/hero.svg +69 -0
- data/app/assets/components/paper-dialog-scrollable/paper-dialog-scrollable.html +150 -0
- data/app/assets/components/paper-dialog/hero.svg +58 -0
- data/app/assets/components/paper-dialog/paper-dialog.html +122 -0
- data/app/assets/components/paper-drawer-panel/hero.svg +21 -0
- data/app/assets/components/paper-drawer-panel/paper-drawer-panel.css +142 -0
- data/app/assets/components/paper-drawer-panel/paper-drawer-panel.html +585 -0
- data/app/assets/components/paper-fab/paper-fab.html +159 -0
- data/app/assets/components/paper-header-panel/hero.svg +38 -0
- data/app/assets/components/paper-header-panel/paper-header-panel.html +496 -0
- data/app/assets/components/paper-icon-button/paper-icon-button.html +141 -0
- data/app/assets/components/paper-input/all-imports.html +12 -0
- data/app/assets/components/paper-input/hero.svg +19 -0
- data/app/assets/components/paper-input/paper-input-addon-behavior.html +43 -0
- data/app/assets/components/paper-input/paper-input-behavior.html +293 -0
- data/app/assets/components/paper-input/paper-input-char-counter.html +95 -0
- data/app/assets/components/paper-input/paper-input-container.html +495 -0
- data/app/assets/components/paper-input/paper-input-error.html +99 -0
- data/app/assets/components/paper-input/paper-input.html +126 -0
- data/app/assets/components/paper-input/paper-textarea.html +100 -0
- data/app/assets/components/paper-item/all-imports.html +13 -0
- data/app/assets/components/paper-item/paper-icon-item.html +86 -0
- data/app/assets/components/paper-item/paper-item-body.html +93 -0
- data/app/assets/components/paper-item/paper-item-shared.css +19 -0
- data/app/assets/components/paper-item/paper-item.html +95 -0
- data/app/assets/components/paper-material/paper-material.html +98 -0
- data/app/assets/components/paper-menu/hero.svg +35 -0
- data/app/assets/components/paper-menu/paper-menu.html +133 -0
- data/app/assets/components/paper-progress/hero.svg +21 -0
- data/app/assets/components/paper-progress/paper-progress.html +199 -0
- data/app/assets/components/paper-radio-button/hero.svg +22 -0
- data/app/assets/components/paper-radio-button/paper-radio-button.css +109 -0
- data/app/assets/components/paper-radio-button/paper-radio-button.html +148 -0
- data/app/assets/components/paper-radio-group/hero.svg +25 -0
- data/app/assets/components/paper-radio-group/paper-radio-group.html +186 -0
- data/app/assets/components/paper-ripple/hero.svg +30 -0
- data/app/assets/components/paper-ripple/paper-ripple.html +714 -0
- data/app/assets/components/paper-scroll-header-panel/hero.svg +41 -0
- data/app/assets/components/paper-scroll-header-panel/paper-scroll-header-panel.html +455 -0
- data/app/assets/components/paper-slider/hero.svg +20 -0
- data/app/assets/components/paper-slider/paper-slider.css +252 -0
- data/app/assets/components/paper-slider/paper-slider.html +449 -0
- data/app/assets/components/paper-spinner/hero.svg +27 -0
- data/app/assets/components/paper-spinner/paper-spinner.css +325 -0
- data/app/assets/components/paper-spinner/paper-spinner.html +222 -0
- data/app/assets/components/paper-styles/classes/global.html +96 -0
- data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
- data/app/assets/components/paper-styles/classes/shadow.html +39 -0
- data/app/assets/components/paper-styles/classes/typography.html +171 -0
- data/app/assets/components/paper-styles/color.html +333 -0
- data/app/assets/components/paper-styles/default-theme.html +39 -0
- data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
- data/app/assets/components/paper-styles/paper-styles.html +17 -0
- data/app/assets/components/paper-styles/shadow.html +61 -0
- data/app/assets/components/paper-styles/typography.html +240 -0
- data/app/assets/components/paper-tabs/hero.svg +23 -0
- data/app/assets/components/paper-tabs/paper-tab.html +158 -0
- data/app/assets/components/paper-tabs/paper-tabs-icons.html +18 -0
- data/app/assets/components/paper-tabs/paper-tabs.html +483 -0
- data/app/assets/components/paper-toast/hero.svg +20 -0
- data/app/assets/components/paper-toast/paper-toast.html +164 -0
- data/app/assets/components/paper-toggle-button/hero.svg +22 -0
- data/app/assets/components/paper-toggle-button/paper-toggle-button.css +108 -0
- data/app/assets/components/paper-toggle-button/paper-toggle-button.html +183 -0
- data/app/assets/components/paper-toolbar/paper-toolbar.html +375 -0
- data/app/assets/components/polymer-gestures/Gruntfile.js +60 -0
- data/app/assets/components/polymer-gestures/banner.txt +9 -0
- data/app/assets/components/polymer-gestures/build.json +17 -0
- data/app/assets/components/polymer-gestures/conf/karma.conf.js +39 -0
- data/app/assets/components/polymer-gestures/package.json +20 -0
- data/app/assets/components/polymer-gestures/polymer-gestures.html +21 -0
- data/app/assets/components/polymer-gestures/polymer-gestures.js +46 -0
- data/app/assets/components/polymer-gestures/src/dispatcher.js +474 -0
- data/app/assets/components/polymer-gestures/src/eventFactory.js +127 -0
- data/app/assets/components/polymer-gestures/src/hold.js +129 -0
- data/app/assets/components/polymer-gestures/src/mouse.js +135 -0
- data/app/assets/components/polymer-gestures/src/ms.js +80 -0
- data/app/assets/components/polymer-gestures/src/pinch.js +186 -0
- data/app/assets/components/polymer-gestures/src/platform-events.js +39 -0
- data/app/assets/components/polymer-gestures/src/pointer.js +68 -0
- data/app/assets/components/polymer-gestures/src/pointermap.js +67 -0
- data/app/assets/components/polymer-gestures/src/scope.js +10 -0
- data/app/assets/components/polymer-gestures/src/tap.js +103 -0
- data/app/assets/components/polymer-gestures/src/targetfind.js +244 -0
- data/app/assets/components/polymer-gestures/src/touch-action.js +60 -0
- data/app/assets/components/polymer-gestures/src/touch.js +341 -0
- data/app/assets/components/polymer-gestures/src/track.js +230 -0
- data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
- data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
- data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
- data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
- data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
- data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
- data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
- data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
- data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
- data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
- data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
- data/app/assets/components/webcomponentsjs/package.json +31 -0
- data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
- data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
- data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
- data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
- data/lib/polymer-paper-elements-rails.rb +2 -0
- data/lib/polymer-paper-elements-rails/engine.rb +4 -0
- data/lib/polymer-paper-elements-rails/version.rb +3 -0
- metadata +272 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
|
|
6
|
+
<g id="background" display="none">
|
|
7
|
+
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
|
|
8
|
+
</g>
|
|
9
|
+
<g id="label">
|
|
10
|
+
</g>
|
|
11
|
+
<g id="art">
|
|
12
|
+
<path d="M175,102H61V24h114V102z M63,100h110V26H63V100z"/>
|
|
13
|
+
<path d="M91,102H61V24h30V102z M63,100h26V26H63V100z"/>
|
|
14
|
+
<circle cx="123" cy="63" r="4"/>
|
|
15
|
+
<rect x="90" y="62" width="33" height="2"/>
|
|
16
|
+
<g id="ic_x5F_add_x0D_">
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
<g id="Guides">
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
5
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
6
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7
|
+
Code distributed by Google as part of the polymer project is also
|
|
8
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9
|
+
|
|
10
|
+
*/
|
|
11
|
+
:host {
|
|
12
|
+
display: block;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
iron-selector > #drawer {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
left: 0;
|
|
25
|
+
height: 100%;
|
|
26
|
+
background-color: white;
|
|
27
|
+
will-change: transform;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
-moz-box-sizing: border-box;
|
|
30
|
+
|
|
31
|
+
@apply(--paper-drawer-panel-drawer-container);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.transition > #drawer {
|
|
35
|
+
transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s;
|
|
36
|
+
transition: transform ease-in-out 0.3s, width ease-in-out 0.3s;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.left-drawer > #drawer {
|
|
40
|
+
@apply(--paper-drawer-panel-left-drawer-container);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.right-drawer > #drawer {
|
|
44
|
+
left: auto;
|
|
45
|
+
right: 0;
|
|
46
|
+
|
|
47
|
+
@apply(--paper-drawer-panel-right-drawer-container);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
iron-selector > #main {
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 0;
|
|
53
|
+
right: 0;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
|
|
56
|
+
@apply(--paper-drawer-panel-main-container);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.transition > #main {
|
|
60
|
+
transition: left ease-in-out 0.3s, padding ease-in-out 0.3s;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.right-drawer > #main {
|
|
64
|
+
left: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.right-drawer.transition > #main {
|
|
68
|
+
transition: right ease-in-out 0.3s, padding ease-in-out 0.3s;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
#main > ::content > [main] {
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#drawer > ::content > [drawer] {
|
|
76
|
+
height: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
#scrim {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 0;
|
|
82
|
+
right: 0;
|
|
83
|
+
bottom: 0;
|
|
84
|
+
left: 0;
|
|
85
|
+
visibility: hidden;
|
|
86
|
+
opacity: 0;
|
|
87
|
+
transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s;
|
|
88
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.narrow-layout > #drawer.iron-selected {
|
|
92
|
+
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.right-drawer.narrow-layout > #drawer.iron-selected {
|
|
96
|
+
box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.narrow-layout > #drawer > ::content > [drawer] {
|
|
100
|
+
border: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.left-drawer.narrow-layout > #drawer:not(.iron-selected) {
|
|
104
|
+
-webkit-transform: translateX(-100%);
|
|
105
|
+
transform: translateX(-100%);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.right-drawer.narrow-layout > #drawer:not(.iron-selected) {
|
|
109
|
+
left: auto;
|
|
110
|
+
-webkit-transform: translateX(100%);
|
|
111
|
+
transform: translateX(100%);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.narrow-layout > #main {
|
|
115
|
+
left: 0 !important;
|
|
116
|
+
padding: 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.right-drawer.narrow-layout > #main {
|
|
120
|
+
left: 0;
|
|
121
|
+
right: 0;
|
|
122
|
+
padding: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.narrow-layout > #main:not(.iron-selected) > #scrim,
|
|
126
|
+
.dragging > #main > #scrim {
|
|
127
|
+
visibility: visible;
|
|
128
|
+
opacity: var(--paper-drawer-panel-scrim-opacity, 1);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.narrow-layout > #main > * {
|
|
132
|
+
margin: 0;
|
|
133
|
+
min-height: 100%;
|
|
134
|
+
left: 0;
|
|
135
|
+
right: 0;
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
-moz-box-sizing: border-box;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
|
141
|
+
display: none;
|
|
142
|
+
}
|
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
<link rel="import" href="../polymer/polymer.html">
|
|
11
|
+
<link rel="import" href="../iron-media-query/iron-media-query.html">
|
|
12
|
+
<link rel="import" href="../iron-selector/iron-selector.html">
|
|
13
|
+
|
|
14
|
+
<!--
|
|
15
|
+
`paper-drawer-panel` contains a drawer panel and a main panel. The drawer
|
|
16
|
+
and the main panel are side-by-side with drawer on the left. When the browser
|
|
17
|
+
window size is smaller than the `responsiveWidth`, `paper-drawer-panel`
|
|
18
|
+
changes to narrow layout. In narrow layout, the drawer will be stacked on top
|
|
19
|
+
of the main panel. The drawer will slide in/out to hide/reveal the main
|
|
20
|
+
panel.
|
|
21
|
+
|
|
22
|
+
Use the attribute `drawer` to indicate that the element is the drawer panel and
|
|
23
|
+
`main` to indicate that the element is the main panel.
|
|
24
|
+
|
|
25
|
+
Example:
|
|
26
|
+
|
|
27
|
+
<paper-drawer-panel>
|
|
28
|
+
<div drawer> Drawer panel... </div>
|
|
29
|
+
<div main> Main panel... </div>
|
|
30
|
+
</paper-drawer-panel>
|
|
31
|
+
|
|
32
|
+
The drawer and the main panels are not scrollable. You can set CSS overflow
|
|
33
|
+
property on the elements to make them scrollable or use `paper-header-panel`.
|
|
34
|
+
|
|
35
|
+
Example:
|
|
36
|
+
|
|
37
|
+
<paper-drawer-panel>
|
|
38
|
+
<paper-header-panel drawer>
|
|
39
|
+
<paper-toolbar></paper-toolbar>
|
|
40
|
+
<div> Drawer content... </div>
|
|
41
|
+
</paper-header-panel>
|
|
42
|
+
<paper-header-panel main>
|
|
43
|
+
<paper-toolbar></paper-toolbar>
|
|
44
|
+
<div> Main content... </div>
|
|
45
|
+
</paper-header-panel>
|
|
46
|
+
</paper-drawer-panel>
|
|
47
|
+
|
|
48
|
+
An element that should toggle the drawer will automatically do so if it's
|
|
49
|
+
given the `paper-drawer-toggle` attribute. Also this element will automatically
|
|
50
|
+
be hidden in wide layout.
|
|
51
|
+
|
|
52
|
+
Example:
|
|
53
|
+
|
|
54
|
+
<paper-drawer-panel>
|
|
55
|
+
<paper-header-panel drawer>
|
|
56
|
+
<paper-toolbar>
|
|
57
|
+
<div>Application</div>
|
|
58
|
+
</paper-toolbar>
|
|
59
|
+
<div> Drawer content... </div>
|
|
60
|
+
</paper-header-panel>
|
|
61
|
+
<paper-header-panel main>
|
|
62
|
+
<paper-toolbar>
|
|
63
|
+
<paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
|
|
64
|
+
<div>Title</div>
|
|
65
|
+
</paper-toolbar>
|
|
66
|
+
<div> Main content... </div>
|
|
67
|
+
</paper-header-panel>
|
|
68
|
+
</paper-drawer-panel>
|
|
69
|
+
|
|
70
|
+
To position the drawer to the right, add `right-drawer` attribute.
|
|
71
|
+
|
|
72
|
+
<paper-drawer-panel right-drawer>
|
|
73
|
+
<div drawer> Drawer panel... </div>
|
|
74
|
+
<div main> Main panel... </div>
|
|
75
|
+
</paper-drawer-panel>
|
|
76
|
+
|
|
77
|
+
Styling paper-drawer-panel:
|
|
78
|
+
|
|
79
|
+
To change the main container:
|
|
80
|
+
paper-drawer-panel {
|
|
81
|
+
--paper-drawer-panel-main-container: {
|
|
82
|
+
background-color: gray;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
To change the drawer container when it's in the left side:
|
|
87
|
+
paper-drawer-panel {
|
|
88
|
+
--paper-drawer-panel-left-drawer-container: {
|
|
89
|
+
background-color: white;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
To change the drawer container when it's in the right side:
|
|
94
|
+
|
|
95
|
+
paper-drawer-panel {
|
|
96
|
+
--paper-drawer-panel-right-drawer-container: {
|
|
97
|
+
background-color: white;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@group Paper elements
|
|
102
|
+
@element paper-drawer-panel
|
|
103
|
+
@demo demo/index.html
|
|
104
|
+
@hero hero.svg
|
|
105
|
+
-->
|
|
106
|
+
|
|
107
|
+
<dom-module id="paper-drawer-panel">
|
|
108
|
+
<link rel="import" type="css" href="paper-drawer-panel.css">
|
|
109
|
+
|
|
110
|
+
<template>
|
|
111
|
+
<iron-media-query
|
|
112
|
+
id="mq"
|
|
113
|
+
on-query-matches-changed="_onQueryMatchesChanged"
|
|
114
|
+
query="[[_computeMediaQuery(forceNarrow, responsiveWidth)]]">
|
|
115
|
+
</iron-media-query>
|
|
116
|
+
|
|
117
|
+
<iron-selector
|
|
118
|
+
attr-for-selected="id"
|
|
119
|
+
class$="[[_computeIronSelectorClass(narrow, transition, dragging, rightDrawer)]]"
|
|
120
|
+
activate-event=""
|
|
121
|
+
selected="[[selected]]">
|
|
122
|
+
|
|
123
|
+
<div id="main" style$="[[_computeMainStyle(narrow, rightDrawer, drawerWidth)]]">
|
|
124
|
+
<content select="[main]"></content>
|
|
125
|
+
<div id="scrim" on-tap="closeDrawer"></div>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<div id="drawer" style$="[[_computeDrawerStyle(drawerWidth)]]">
|
|
129
|
+
<content select="[drawer]"></content>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
</iron-selector>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
</dom-module>
|
|
136
|
+
|
|
137
|
+
<script>
|
|
138
|
+
|
|
139
|
+
(function() {
|
|
140
|
+
|
|
141
|
+
'use strict';
|
|
142
|
+
|
|
143
|
+
// this would be the only `paper-drawer-panel` in
|
|
144
|
+
// the whole app that can be in `dragging` state
|
|
145
|
+
var sharedPanel = null;
|
|
146
|
+
|
|
147
|
+
function classNames(obj) {
|
|
148
|
+
var classes = [];
|
|
149
|
+
for (var key in obj) {
|
|
150
|
+
if (obj.hasOwnProperty(key) && obj[key]) {
|
|
151
|
+
classes.push(key);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return classes.join(' ');
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
Polymer({
|
|
159
|
+
|
|
160
|
+
is: 'paper-drawer-panel',
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Fired when the narrow layout changes.
|
|
164
|
+
*
|
|
165
|
+
* @event paper-responsive-change {{narrow: boolean}} detail -
|
|
166
|
+
* narrow: true if the panel is in narrow layout.
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Fired when the selected panel changes.
|
|
171
|
+
*
|
|
172
|
+
* Listening for this event is an alternative to observing changes in the `selected` attribute.
|
|
173
|
+
* This event is fired both when a panel is selected and deselected.
|
|
174
|
+
* The `isSelected` detail property contains the selection state.
|
|
175
|
+
*
|
|
176
|
+
* @event paper-select {{isSelected: boolean, item: Object}} detail -
|
|
177
|
+
* isSelected: True for selection and false for deselection.
|
|
178
|
+
* item: The panel that the event refers to.
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
properties: {
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The panel to be selected when `paper-drawer-panel` changes to narrow
|
|
185
|
+
* layout.
|
|
186
|
+
*/
|
|
187
|
+
defaultSelected: {
|
|
188
|
+
type: String,
|
|
189
|
+
value: 'main'
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* If true, swipe from the edge is disable.
|
|
194
|
+
*/
|
|
195
|
+
disableEdgeSwipe: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
value: false
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* If true, swipe to open/close the drawer is disabled.
|
|
202
|
+
*/
|
|
203
|
+
disableSwipe: {
|
|
204
|
+
type: Boolean,
|
|
205
|
+
value: false
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Whether the user is dragging the drawer interactively.
|
|
210
|
+
*/
|
|
211
|
+
dragging: {
|
|
212
|
+
type: Boolean,
|
|
213
|
+
value: false
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Width of the drawer panel.
|
|
218
|
+
*/
|
|
219
|
+
drawerWidth: {
|
|
220
|
+
type: String,
|
|
221
|
+
value: '256px'
|
|
222
|
+
},
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* How many pixels on the side of the screen are sensitive to edge
|
|
226
|
+
* swipes and peek.
|
|
227
|
+
*/
|
|
228
|
+
edgeSwipeSensitivity: {
|
|
229
|
+
type: Number,
|
|
230
|
+
value: 30
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* If true, ignore `responsiveWidth` setting and force the narrow layout.
|
|
235
|
+
*/
|
|
236
|
+
forceNarrow: {
|
|
237
|
+
type: Boolean,
|
|
238
|
+
value: false
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Whether the browser has support for the transform CSS property.
|
|
243
|
+
*/
|
|
244
|
+
hasTransform: {
|
|
245
|
+
type: Boolean,
|
|
246
|
+
value: function() {
|
|
247
|
+
return 'transform' in this.style;
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Whether the browser has support for the will-change CSS property.
|
|
253
|
+
*/
|
|
254
|
+
hasWillChange: {
|
|
255
|
+
type: Boolean,
|
|
256
|
+
value: function() {
|
|
257
|
+
return 'willChange' in this.style;
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Returns true if the panel is in narrow layout. This is useful if you
|
|
263
|
+
* need to show/hide elements based on the layout.
|
|
264
|
+
*/
|
|
265
|
+
narrow: {
|
|
266
|
+
reflectToAttribute: true,
|
|
267
|
+
type: Boolean,
|
|
268
|
+
value: false,
|
|
269
|
+
notify: true
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Whether the drawer is peeking out from the edge.
|
|
274
|
+
*/
|
|
275
|
+
peeking: {
|
|
276
|
+
type: Boolean,
|
|
277
|
+
value: false
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Max-width when the panel changes to narrow layout.
|
|
282
|
+
*/
|
|
283
|
+
responsiveWidth: {
|
|
284
|
+
type: String,
|
|
285
|
+
value: '640px'
|
|
286
|
+
},
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* If true, position the drawer to the right.
|
|
290
|
+
*/
|
|
291
|
+
rightDrawer: {
|
|
292
|
+
type: Boolean,
|
|
293
|
+
value: false
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The panel that is being selected. `drawer` for the drawer panel and
|
|
298
|
+
* `main` for the main panel.
|
|
299
|
+
*/
|
|
300
|
+
selected: {
|
|
301
|
+
reflectToAttribute: true,
|
|
302
|
+
type: String,
|
|
303
|
+
value: null
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* The attribute on elements that should toggle the drawer on tap, also elements will
|
|
308
|
+
* automatically be hidden in wide layout.
|
|
309
|
+
*/
|
|
310
|
+
drawerToggleAttribute: {
|
|
311
|
+
type: String,
|
|
312
|
+
value: 'paper-drawer-toggle'
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Whether the transition is enabled.
|
|
317
|
+
*/
|
|
318
|
+
transition: {
|
|
319
|
+
type: Boolean,
|
|
320
|
+
value: false
|
|
321
|
+
},
|
|
322
|
+
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
listeners: {
|
|
326
|
+
tap: '_onTap',
|
|
327
|
+
track: '_onTrack',
|
|
328
|
+
down: '_downHandler',
|
|
329
|
+
up: '_upHandler'
|
|
330
|
+
},
|
|
331
|
+
|
|
332
|
+
observers: [
|
|
333
|
+
'_forceNarrowChanged(forceNarrow, defaultSelected)'
|
|
334
|
+
],
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Toggles the panel open and closed.
|
|
338
|
+
*
|
|
339
|
+
* @method togglePanel
|
|
340
|
+
*/
|
|
341
|
+
togglePanel: function() {
|
|
342
|
+
if (this._isMainSelected()) {
|
|
343
|
+
this.openDrawer();
|
|
344
|
+
} else {
|
|
345
|
+
this.closeDrawer();
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Opens the drawer.
|
|
351
|
+
*
|
|
352
|
+
* @method openDrawer
|
|
353
|
+
*/
|
|
354
|
+
openDrawer: function() {
|
|
355
|
+
this.selected = 'drawer';
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Closes the drawer.
|
|
360
|
+
*
|
|
361
|
+
* @method closeDrawer
|
|
362
|
+
*/
|
|
363
|
+
closeDrawer: function() {
|
|
364
|
+
this.selected = 'main';
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
ready: function() {
|
|
368
|
+
// Avoid transition at the beginning e.g. page loads and enable
|
|
369
|
+
// transitions only after the element is rendered and ready.
|
|
370
|
+
this.transition = true;
|
|
371
|
+
},
|
|
372
|
+
|
|
373
|
+
_computeIronSelectorClass: function(narrow, transition, dragging, rightDrawer) {
|
|
374
|
+
return classNames({
|
|
375
|
+
dragging: dragging,
|
|
376
|
+
'narrow-layout': narrow,
|
|
377
|
+
'right-drawer': rightDrawer,
|
|
378
|
+
'left-drawer': !rightDrawer,
|
|
379
|
+
transition: transition
|
|
380
|
+
});
|
|
381
|
+
},
|
|
382
|
+
|
|
383
|
+
_computeDrawerStyle: function(drawerWidth) {
|
|
384
|
+
return 'width:' + drawerWidth + ';';
|
|
385
|
+
},
|
|
386
|
+
|
|
387
|
+
_computeMainStyle: function(narrow, rightDrawer, drawerWidth) {
|
|
388
|
+
var style = '';
|
|
389
|
+
|
|
390
|
+
style += 'left:' + ((narrow || rightDrawer) ? '0' : drawerWidth) + ';';
|
|
391
|
+
|
|
392
|
+
if (rightDrawer) {
|
|
393
|
+
style += 'right:' + (narrow ? '' : drawerWidth) + ';';
|
|
394
|
+
} else {
|
|
395
|
+
style += 'right:;';
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return style;
|
|
399
|
+
},
|
|
400
|
+
|
|
401
|
+
_computeMediaQuery: function(forceNarrow, responsiveWidth) {
|
|
402
|
+
return forceNarrow ? '' : '(max-width: ' + responsiveWidth + ')';
|
|
403
|
+
},
|
|
404
|
+
|
|
405
|
+
_computeSwipeOverlayHidden: function(narrow, disableEdgeSwipe) {
|
|
406
|
+
return !narrow || disableEdgeSwipe;
|
|
407
|
+
},
|
|
408
|
+
|
|
409
|
+
_onTrack: function(e) {
|
|
410
|
+
if (sharedPanel && this !== sharedPanel) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
switch (e.detail.state) {
|
|
414
|
+
case 'start':
|
|
415
|
+
this._trackStart(e);
|
|
416
|
+
break;
|
|
417
|
+
case 'track':
|
|
418
|
+
this._trackX(e);
|
|
419
|
+
break;
|
|
420
|
+
case 'end':
|
|
421
|
+
this._trackEnd(e);
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
_responsiveChange: function(narrow) {
|
|
428
|
+
this.narrow = narrow;
|
|
429
|
+
|
|
430
|
+
if (this.narrow) {
|
|
431
|
+
this.selected = this.defaultSelected;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
this.setScrollDirection(this._swipeAllowed() ? 'y' : 'all');
|
|
435
|
+
this.fire('paper-responsive-change', {narrow: this.narrow});
|
|
436
|
+
},
|
|
437
|
+
|
|
438
|
+
_onQueryMatchesChanged: function(e) {
|
|
439
|
+
this._responsiveChange(e.detail.value);
|
|
440
|
+
},
|
|
441
|
+
|
|
442
|
+
_forceNarrowChanged: function() {
|
|
443
|
+
// set the narrow mode only if we reached the `responsiveWidth`
|
|
444
|
+
this._responsiveChange(this.forceNarrow || this.$.mq.queryMatches);
|
|
445
|
+
},
|
|
446
|
+
|
|
447
|
+
_swipeAllowed: function() {
|
|
448
|
+
return this.narrow && !this.disableSwipe;
|
|
449
|
+
},
|
|
450
|
+
|
|
451
|
+
_isMainSelected: function() {
|
|
452
|
+
return this.selected === 'main';
|
|
453
|
+
},
|
|
454
|
+
|
|
455
|
+
_startEdgePeek: function() {
|
|
456
|
+
this.width = this.$.drawer.offsetWidth;
|
|
457
|
+
this._moveDrawer(this._translateXForDeltaX(this.rightDrawer ?
|
|
458
|
+
-this.edgeSwipeSensitivity : this.edgeSwipeSensitivity));
|
|
459
|
+
this.peeking = true;
|
|
460
|
+
},
|
|
461
|
+
|
|
462
|
+
_stopEdgePeek: function() {
|
|
463
|
+
if (this.peeking) {
|
|
464
|
+
this.peeking = false;
|
|
465
|
+
this._moveDrawer(null);
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
|
|
469
|
+
_downHandler: function(e) {
|
|
470
|
+
if (!this.dragging && this._isMainSelected() && this._isEdgeTouch(e) && !sharedPanel) {
|
|
471
|
+
this._startEdgePeek();
|
|
472
|
+
// grab this panel
|
|
473
|
+
sharedPanel = this;
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
_upHandler: function() {
|
|
478
|
+
this._stopEdgePeek();
|
|
479
|
+
// release the panel
|
|
480
|
+
sharedPanel = null;
|
|
481
|
+
},
|
|
482
|
+
|
|
483
|
+
_onTap: function(e) {
|
|
484
|
+
var targetElement = Polymer.dom(e).localTarget;
|
|
485
|
+
var isTargetToggleElement = targetElement &&
|
|
486
|
+
this.drawerToggleAttribute &&
|
|
487
|
+
targetElement.hasAttribute(this.drawerToggleAttribute);
|
|
488
|
+
|
|
489
|
+
if (isTargetToggleElement) {
|
|
490
|
+
this.togglePanel();
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
|
|
494
|
+
_isEdgeTouch: function(e) {
|
|
495
|
+
var x = e.detail.x;
|
|
496
|
+
|
|
497
|
+
return !this.disableEdgeSwipe && this._swipeAllowed() &&
|
|
498
|
+
(this.rightDrawer ?
|
|
499
|
+
x >= this.offsetWidth - this.edgeSwipeSensitivity :
|
|
500
|
+
x <= this.edgeSwipeSensitivity);
|
|
501
|
+
},
|
|
502
|
+
|
|
503
|
+
_trackStart: function() {
|
|
504
|
+
if (this._swipeAllowed()) {
|
|
505
|
+
sharedPanel = this;
|
|
506
|
+
this.dragging = true;
|
|
507
|
+
|
|
508
|
+
if (this._isMainSelected()) {
|
|
509
|
+
this.dragging = this.peeking || this._isEdgeTouch(event);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
if (this.dragging) {
|
|
513
|
+
this.width = this.$.drawer.offsetWidth;
|
|
514
|
+
this.transition = false;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
|
|
519
|
+
_translateXForDeltaX: function(deltaX) {
|
|
520
|
+
var isMain = this._isMainSelected();
|
|
521
|
+
|
|
522
|
+
if (this.rightDrawer) {
|
|
523
|
+
return Math.max(0, isMain ? this.width + deltaX : deltaX);
|
|
524
|
+
} else {
|
|
525
|
+
return Math.min(0, isMain ? deltaX - this.width : deltaX);
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
|
|
529
|
+
_trackX: function(e) {
|
|
530
|
+
if (this.dragging) {
|
|
531
|
+
var dx = e.detail.dx;
|
|
532
|
+
|
|
533
|
+
if (this.peeking) {
|
|
534
|
+
if (Math.abs(dx) <= this.edgeSwipeSensitivity) {
|
|
535
|
+
// Ignore trackx until we move past the edge peek.
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
this.peeking = false;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
this._moveDrawer(this._translateXForDeltaX(dx));
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
|
|
545
|
+
_trackEnd: function(e) {
|
|
546
|
+
if (this.dragging) {
|
|
547
|
+
var xDirection = e.detail.dx > 0;
|
|
548
|
+
|
|
549
|
+
this.dragging = false;
|
|
550
|
+
this.transition = true;
|
|
551
|
+
sharedPanel = null;
|
|
552
|
+
this._moveDrawer(null);
|
|
553
|
+
|
|
554
|
+
if (this.rightDrawer) {
|
|
555
|
+
this[xDirection ? 'closeDrawer' : 'openDrawer']();
|
|
556
|
+
} else {
|
|
557
|
+
this[xDirection ? 'openDrawer' : 'closeDrawer']();
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
|
|
562
|
+
_transformForTranslateX: function(translateX) {
|
|
563
|
+
if (translateX === null) {
|
|
564
|
+
return '';
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
return this.hasWillChange ? 'translateX(' + translateX + 'px)' :
|
|
568
|
+
'translate3d(' + translateX + 'px, 0, 0)';
|
|
569
|
+
},
|
|
570
|
+
|
|
571
|
+
_moveDrawer: function(translateX) {
|
|
572
|
+
var s = this.$.drawer.style;
|
|
573
|
+
|
|
574
|
+
if (this.hasTransform) {
|
|
575
|
+
s.transform = this._transformForTranslateX(translateX);
|
|
576
|
+
} else {
|
|
577
|
+
s.webkitTransform = this._transformForTranslateX(translateX);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
}());
|
|
584
|
+
|
|
585
|
+
</script>
|