1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update polymer

This commit is contained in:
Luke Pulverenti 2015-10-07 21:49:40 -04:00
parent 8119b930e4
commit cbb6337b41
74 changed files with 2195 additions and 1393 deletions

View file

@ -1,6 +1,6 @@
{
"name": "paper-toggle-button",
"version": "1.0.10",
"version": "1.0.11",
"description": "A material design toggle button control",
"authors": [
"The Polymer Authors"
@ -34,11 +34,11 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0"
},
"_release": "1.0.10",
"_release": "1.0.11",
"_resolution": {
"type": "version",
"tag": "v1.0.10",
"commit": "b9851b6ab872ea03df70b80c6f89478f50d12823"
"tag": "v1.0.11",
"commit": "a6c8e6d76c4645042b4f346dedad18bcd6d8ad10"
},
"_source": "git://github.com/PolymerElements/paper-toggle-button.git",
"_target": "~1.0.5",

View file

@ -1,6 +1,6 @@
{
"name": "paper-toggle-button",
"version": "1.0.10",
"version": "1.0.11",
"description": "A material design toggle button control",
"authors": [
"The Polymer Authors"

View file

@ -101,6 +101,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<paper-toggle-button checked class="blue">Calcium</paper-toggle-button>
</div>
</div>
<div>
<h4>Noink</h4>
<div class="horizontal-section">
<paper-toggle-button noink>Oxygen</paper-toggle-button>
<paper-toggle-button noink>Carbon</paper-toggle-button>
<paper-toggle-button checked noink>Hydrogen</paper-toggle-button>
<paper-toggle-button checked noink>Nitrogen</paper-toggle-button>
<paper-toggle-button checked noink>Calcium</paper-toggle-button>
</div>
</div>
</div>
</body>
</html>

View file

@ -12,10 +12,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../paper-styles/color.html">
<link rel="import" href="../paper-styles/default-theme.html">
<link rel="import" href="../paper-ripple/paper-ripple.html">
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
<link rel="import" href="../iron-checked-element-behavior/iron-checked-element-behavior.html">
<link rel="import" href="../paper-behaviors/paper-checked-element-behavior.html">
<!--
Material design: [Switch](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-switch)
`paper-toggle-button` provides a ON/OFF switch that user can toggle the state
by tapping or by dragging the switch.
@ -48,7 +49,7 @@ Custom property | Description | Default
-->
<dom-module id="paper-toggle-button">
<template>
<template strip-whitespace>
<style>
:host {
@ -156,9 +157,7 @@ Custom property | Description | Default
<div class="toggle-container">
<div id="toggleBar" class="toggle-bar"></div>
<div id="toggleButton" class="toggle-button">
<paper-ripple id="ink" class="toggle-ink circle" recenters></paper-ripple>
</div>
<div id="toggleButton" class="toggle-button"></div>
</div>
<div class="toggle-label"><content></content></div>
@ -170,8 +169,7 @@ Custom property | Description | Default
is: 'paper-toggle-button',
behaviors: [
Polymer.PaperInkyFocusBehavior,
Polymer.IronCheckedElementBehavior
Polymer.PaperCheckedElementBehavior
],
hostAttributes: {
@ -197,20 +195,6 @@ Custom property | Description | Default
track: '_ontrack'
},
ready: function() {
this._isReady = true;
},
// button-behavior hook
_buttonStateChanged: function() {
if (this.disabled) {
return;
}
if (this._isReady) {
this.checked = this.active;
}
},
_ontrack: function(event) {
var track = event.detail;
if (track.state === 'start') {
@ -243,6 +227,16 @@ Custom property | Description | Default
_trackEnd: function(track) {
this.$.toggleButton.classList.remove('dragging');
this.transform('', this.$.toggleButton);
},
// customize the element's ripple
_createRipple: function() {
this._rippleContainer = this.$.toggleButton;
var ripple = Polymer.PaperRippleBehavior._createRipple();
ripple.id = 'ink';
ripple.setAttribute('recenters', '');
ripple.classList.add('circle', 'toggle-ink');
return ripple;
}
});