Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 Polymer({ | |
| 6 is: 'oobe-poly-welcome', | |
|
jdufault
2016/05/11 22:07:44
nit: indent
Alexander Alekseev
2016/05/13 20:52:35
Done.
| |
| 7 | |
| 8 properties: { | |
| 9 disabled: { | |
| 10 type: Boolean, | |
| 11 value: false, | |
| 12 }, | |
| 13 }, | |
| 14 | |
| 15 ready: | |
| 16 function() { | |
| 17 /** | |
| 18 * Workaround for | |
| 19 * https://github.com/PolymerElements/neon-animation/issues/32 | |
| 20 * TODO(dzhioev): Remove when fixed in Polymer. | |
|
jdufault
2016/05/11 22:07:44
Is this still broken? The bug is almost a year old
Alexander Alekseev
2016/05/13 20:52:35
THhs is actually copy-paste from offline gaia scre
| |
| 21 */ | |
| 22 var pages = this.$.animatedPages; | |
| 23 delete pages._squelchNextFinishEvent; | |
| 24 Object.defineProperty( | |
| 25 pages, '_squelchNextFinishEvent', | |
| 26 {get: function() { return false; }}); | |
| 27 }, | |
| 28 | |
| 29 focus: | |
|
jdufault
2016/05/11 22:07:44
nit: Place function() on the same line as the prop
Alexander Alekseev
2016/05/13 20:52:35
Done.
| |
| 30 function() { | |
| 31 if (this.isWelcomeSectionActive_()) | |
| 32 this.$.oobeWelcomeNextButton.focus(); | |
| 33 else | |
| 34 this.$.oobeNetworkSettings.focus(); | |
| 35 }, | |
| 36 | |
| 37 onAnimationFinish_: | |
|
jdufault
2016/05/11 22:07:44
nit: as above.
Alexander Alekseev
2016/05/13 20:52:35
Done.
| |
| 38 function() { | |
| 39 this.focus(); | |
| 40 }, | |
| 41 | |
| 42 isRTL_: | |
|
jdufault
2016/05/11 22:07:44
nit: as above.
Alexander Alekseev
2016/05/13 20:52:35
Done.
| |
| 43 function() { | |
| 44 return !!document.querySelector('html[dir=rtl]'); | |
| 45 }, | |
| 46 | |
| 47 isWelcomeSectionActive_: | |
|
jdufault
2016/05/11 22:07:44
nit: as above.
Alexander Alekseev
2016/05/13 20:52:35
Done.
| |
| 48 function() { | |
| 49 return this.$.animatedPages.selected == 'welcomeSection'; | |
| 50 }, | |
| 51 | |
| 52 setUpPageTransitions_: function() { | |
| 53 var isForward = true; | |
| 54 var isRTL = this.isRTL_(); | |
| 55 this.$.animatedPages.entryAnimation = | |
| 56 'slide-from-' + (isRTL ? 'left' : 'right') + | |
| 57 '-animation'; | |
| 58 this.$.animatedPages.exitAnimation = | |
| 59 'slide-' + (isRTL ? 'right' : 'left') + '-animation'; | |
|
jdufault
2016/05/11 22:07:44
Add in the trailing }s?
Alexander Alekseev
2016/05/13 20:52:35
Done.
| |
| OLD | NEW |