update polymer
This commit is contained in:
parent
8119b930e4
commit
cbb6337b41
74 changed files with 2195 additions and 1393 deletions
|
@ -10,13 +10,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-behaviors/iron-button-state.html">
|
||||
<link rel="import" href="paper-ripple-behavior.html">
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
* `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has keyboard focus.
|
||||
*
|
||||
* @polymerBehavior Polymer.PaperInkyFocusBehavior
|
||||
* @polymerBehavior Polymer.PaperInkyFocusBehaviorImpl
|
||||
*/
|
||||
Polymer.PaperInkyFocusBehaviorImpl = {
|
||||
|
||||
|
@ -25,11 +26,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
],
|
||||
|
||||
_focusedChanged: function(receivedFocusFromKeyboard) {
|
||||
if (!this.$.ink) {
|
||||
return;
|
||||
if (receivedFocusFromKeyboard) {
|
||||
this.ensureRipple();
|
||||
}
|
||||
if (this.hasRipple()) {
|
||||
this._ripple.holdDown = receivedFocusFromKeyboard;
|
||||
}
|
||||
},
|
||||
|
||||
this.$.ink.holdDown = receivedFocusFromKeyboard;
|
||||
_createRipple: function() {
|
||||
var ripple = Polymer.PaperRippleBehavior._createRipple();
|
||||
ripple.id = 'ink';
|
||||
ripple.setAttribute('center', '');
|
||||
ripple.classList.add('circle');
|
||||
return ripple;
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -38,6 +48,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
Polymer.PaperInkyFocusBehavior = [
|
||||
Polymer.IronButtonState,
|
||||
Polymer.IronControlState,
|
||||
Polymer.PaperRippleBehavior,
|
||||
Polymer.PaperInkyFocusBehaviorImpl
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue