update views

This commit is contained in:
Luke Pulverenti 2015-11-18 00:49:20 -05:00
parent 7f0e5e8cd8
commit 8c9287d505
15 changed files with 168 additions and 103 deletions

View file

@ -18796,7 +18796,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<template strip-whitespace="">
<style>
:host {
display: inline-block;
@apply(--layout);
@apply(--layout-justified);
@apply(--layout-center);
width: 200px;
cursor: default;
-webkit-user-select: none;
@ -18817,8 +18819,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
#sliderContainer {
position: relative;
width: calc(100% - 32px);
height: 32px;
width: 100%;
height: calc(30px + var(--paper-slider-height, 2px));
margin-left: calc(15px + var(--paper-slider-height, 2px)/2);
margin-right: calc(15px + var(--paper-slider-height, 2px)/2);
}
#sliderContainer:focus {
@ -18826,70 +18830,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
#sliderContainer.editable {
float: left;
width: calc(100% - 72px);
margin: 12px 0;
margin-top: 12px;
margin-bottom: 12px;
}
.bar-container {
position: absolute;
top: 0;
left: 16px;
height: 100%;
width: 100%;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
}
.ring > .bar-container {
left: 20px;
width: calc(100% - 4px);
left: calc(5px + var(--paper-slider-height, 2px)/2);
transition: left 0.18s ease, width 0.18s ease;
}
.ring.expand:not(.pin) > .bar-container {
left: 30px;
width: calc(100% - 14px);
}
.ring.expand.dragging > .bar-container {
transition: none;
}
.ring.expand:not(.pin) > .bar-container {
left: calc(15px + var(--paper-slider-height, 2px)/2);
}
#sliderBar {
position: absolute;
top: 15px;
left: 0;
padding: 15px 0;
width: 100%;
padding: 8px 0;
margin: -8px 0;
background-color: var(--paper-slider-bar-color, transparent);
--paper-progress-height: var(--paper-slider-height, 2px);
}
.ring #sliderBar {
left: -4px;
width: calc(100% + 4px);
margin-left: calc(-5px - var(--paper-slider-height, 2px)/2);
width: calc(100% + 5px + var(--paper-slider-height, 2px)/2);
}
.ring.expand:not(.pin) #sliderBar {
left: -14px;
width: calc(100% + 14px);
margin-left: calc(-15px - var(--paper-slider-height, 2px)/2);
width: calc(100% + 15px + var(--paper-slider-height, 2px)/2);
}
.slider-markers {
position: absolute;
top: 15px;
left: 15px;
height: 2px;
width: calc(100% + 2px);
top: calc(14px + var(--paper-slider-height,2px)/2);
height: var(--paper-slider-height, 2px);
left: 0;
right: -1px;
box-sizing: border-box;
pointer-events: none;
@apply(--layout-horizontal);
}
.slider-marker {
@apply(--layout-flex);
}
.slider-markers::after,
.slider-marker::after {
content: "";
display: block;
margin-left: -1px;
width: 2px;
height: 2px;
border-radius: 50%;
@ -18897,15 +18898,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
#sliderKnob {
@apply(--layout-center-justified);
@apply(--layout-center);
@apply(--layout-horizontal);
position: absolute;
left: 0;
top: 0;
width: 32px;
height: 32px;
margin-left: calc(-15px - var(--paper-slider-height, 2px)/2);
width: calc(30px + var(--paper-slider-height, 2px));
height: calc(30px + var(--paper-slider-height, 2px));
}
.transiting > #sliderKnob {
@ -18926,20 +18924,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
#sliderKnobInner {
width: 12px;
height: 12px;
margin: 10px;
width: calc(100% - 20px);
height: calc(100% - 20px);
border-radius: 50%;
background-color: var(--paper-slider-knob-color, --google-blue-700);
-moz-box-sizing: border-box;
box-sizing: border-box;
transition-property: height, width, background-color, border;
transition-property: margin, height, width, background-color, border;
transition-duration: 0.1s;
transition-timing-function: ease;
}
.expand:not(.pin) > #sliderKnob > #sliderKnobInner {
margin: 0;
width: 100%;
height: 100%;
@ -18960,10 +18960,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
content: "";
position: absolute;
top: 0;
left: 0;
left: 50%;
margin-left: -13px;
width: 26px;
height: 26px;
margin-left: 3px;
border-radius: 50% 50% 50% 0;
-webkit-transform: rotate(-45deg) scale(0) translate(0);
@ -18989,7 +18989,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
content: attr(value);
position: absolute;
top: 0;
left: 0;
left: 50%;
margin-left: -16px;
width: 32px;
height: 26px;
text-align: center;
@ -19008,7 +19009,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/* paper-input */
.slider-input {
width: 50px;
float: right;
overflow: hidden;
--paper-input-container-input: {
text-align: center;
@ -19020,9 +19020,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
pointer-events: none;
}
.disabled > #sliderKnob {
top: 2px;
margin-left: calc(-13px - var(--paper-slider-height, 2px)/2);
width: calc(26px + var(--paper-slider-height, 2px));
height: calc(26px + var(--paper-slider-height, 2px));
}
.disabled > #sliderKnob > #sliderKnobInner {
width: 8px;
height: 8px;
background-color: var(--paper-slider-disabled-knob-color, --google-grey-500);
}
@ -19043,14 +19048,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</div>
<template is="dom-if" if="[[snaps]]">
<div class="slider-markers horizontal layout">
<div class="slider-markers">
<template is="dom-repeat" items="[[markers]]">
<div class="slider-marker flex"></div>
<div class="slider-marker"></div>
</template>
</div>
</template>
<div id="sliderKnob" class="center-justified center horizontal layout" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd">
<div id="sliderKnob" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd">
<div id="sliderKnobInner" value$="[[pinValue]]"></div>
</div>
</div>
@ -19290,6 +19295,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this.translate3d(translateX + 'px', 0, 0, this.$.sliderKnob);
this._setPinValue(immediateValue);
},
_setPinValue: function (value) {
this.pinValue = value;
},
_trackEnd: function() {
var s = this.$.sliderKnob.style;
@ -19303,9 +19311,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this.fire('change');
},
_setPinValue: function (value) {
this.pinValue = value;
},
_knobdown: function(event) {
this._expandKnob();
@ -19352,12 +19357,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
_maxMarkersChanged: function(maxMarkers) {
var l = (this.max - this.min) / this.step;
if (!this.snaps && l > maxMarkers) {
if (!this.snaps) {
this._setMarkers([]);
} else {
this._setMarkers(new Array(l));
}
var steps = Math.floor((this.max - this.min) / this.step);
if (steps > maxMarkers) {
steps = maxMarkers;
}
this._setMarkers(new Array(steps));
},
_mergeClasses: function(classes) {