mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
d5dc8e15ea
commit
7cfa21451a
16 changed files with 150 additions and 131 deletions
|
@ -32,14 +32,14 @@
|
|||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||
"_release": "1.0.8",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.8",
|
||||
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-icon"
|
||||
"_originalSource": "polymerelements/iron-icon"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-overlay-behavior",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.1",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Provides a behavior for making an element an overlay",
|
||||
"private": true,
|
||||
|
@ -35,11 +35,11 @@
|
|||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/polymerelements/iron-overlay-behavior",
|
||||
"_release": "1.5.0",
|
||||
"_release": "1.5.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.5.0",
|
||||
"commit": "700a82504db1c57757dbf4abd176954dcb74e6fb"
|
||||
"tag": "v1.5.1",
|
||||
"commit": "b6f4126ecbfdc9dc149beac8e7fbe201bbd14ad5"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-overlay-behavior",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.1",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Provides a behavior for making an element an overlay",
|
||||
"private": true,
|
||||
|
|
|
@ -559,7 +559,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
};
|
||||
|
||||
/** @polymerBehavior */
|
||||
Polymer.IronOverlayBehavior = [Polymer.IronA11yKeysBehavior, Polymer.IronFitBehavior, Polymer.IronResizableBehavior, Polymer.IronOverlayBehaviorImpl];
|
||||
Polymer.IronOverlayBehavior = [Polymer.IronFitBehavior, Polymer.IronResizableBehavior, Polymer.IronOverlayBehaviorImpl];
|
||||
|
||||
/**
|
||||
* Fired after the `iron-overlay` opens.
|
||||
|
|
|
@ -254,7 +254,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
_onCaptureClick: function(event) {
|
||||
var overlay = /** @type {?} */ (this.currentOverlay());
|
||||
// Check if clicked outside of any overlay.
|
||||
var target = Polymer.dom(event).rootTarget;
|
||||
var target = /** @type {Element} */ (Polymer.dom(event).rootTarget);
|
||||
if (overlay && this._overlayParent(target) !== overlay) {
|
||||
overlay._onCaptureClick(event);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"tag": "v1.0.11",
|
||||
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
||||
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/paper-behaviors"
|
||||
"_originalSource": "PolymerElements/paper-behaviors"
|
||||
}
|
|
@ -32,14 +32,14 @@
|
|||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
||||
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/paper-ripple"
|
||||
"_originalSource": "PolymerElements/paper-ripple"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-slider",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "A material design-style slider",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"authors": "The Polymer Authors",
|
||||
|
@ -29,17 +29,18 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/paper-slider",
|
||||
"_release": "1.0.9",
|
||||
"_release": "1.0.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.9",
|
||||
"commit": "5814b574e9440cec40619157f00b7aa2ced20c8d"
|
||||
"tag": "v1.0.10",
|
||||
"commit": "9b71cd988af6b000403a6f59c51ea6c789ded930"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-slider.git",
|
||||
"_target": "~1.0.3",
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install web-component-tester
|
||||
- npm install bower
|
||||
- 'export PATH=$PWD/node_modules/.bin:$PATH'
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
env:
|
||||
global:
|
||||
- secure: W9pv3wK5AyI038GpPZpFo5yii72up1pTHM9yu8TI4th6Q/TiUQCa8GbjAMhUcbMDl3Y4i50WjckykSox+c506Zs5Pe5vDCaKpHT/iOHYqjIaQEDGGvvKWxSTJr82HY2taNhkH7seksg7oKq8dL7DCBLyKJUl03hGmRqZABjIw9fWjSNUb9PVdlZass5nJaqw954t76GYBWcQ71fntm8uCnSrQoviHEprvfwZMNnK0mhd79VmBohl83jpFU8FaYEWLc5IFY29u7McLxgynZBggwhGSrvdDrOYG4jtn26RNx4mNCcJGxejzadvf4K6H2S45SGnsCIjJRJbl8MV+ni18VqC/BuCF2J4k8QqSRtWi2mSq/l9DOgIiwViPRjPRxoK+a+/6qA7pQ1aMXBWWF4FjngvgoZHcY2J5FptbRltDtalrUSbUVmmKNoWwaJa4Sb5OopJdr0herGds946qzQKW1FLqkcDTtF6c4fZqK12WVEIXZLXiP9sV9+dBJDXT4oWzgjo2GHAiMEzV6Xk3oZ/RHmWJ34Bemy7M5zYKDHErLhD6/UXiA/tYlTqqgu/4Jdxs07ilWmaVd3kTYywRYuTzR4yO3xq8ElpEnpby2WobGiVCsuzQwOe4fWSvV4wS8TpSdigoGxYQ+FPrrbc7jhgRodyZP1xF/mTHlIvNmaTYYc=
|
||||
- secure: xLLhaBejrIuYAxwQoFPsrvnBpeDVY8IYdThJ36fJnD4V0jpqS7m8b2rw5fYrtwWvmEAQlqJ20/hnjfp9kKXr6Qpkj2im9d0KWdw4xAyD2KxiG/u5pBn1Y+zE9iGjq+NGa58EJDNaxQSnaXmVnk55tyT9W3ailkiO/lEtaofXXXGqiW9Nxa9D0GtbbNWBypcoc7X/HXCcg5hVpdVjEFh3Y+nFWIdqJEO0V7oKujfb5yFhu5PRU7siTzdN+nLoPXPMlkBa3aWwPLdM1D9HKXN1jBX6dM9dH3oz20K/TCPpbO5u675vfuTT9iP9XuLy4LB/cl7S6bcopvhU5ipkQvLEieeq73EP1hz5vwdSWgleXkNhWBInhzeHLTI04M49ZxIc0NEay2Tvx9tQl5e8BT1/WglpjnHvqx/VoF7zkHRfWyWeObL6YyFVFiJ0Gz3ExJTUCruQRBen+g2Cqr1qwBN4bFPhgxzHW58ECdsDFvfpZT3I7h/wnCzNVOZx+A74nVwDpl6zg+/+GWpqZF2ILGbRDTcjp1A/eH+FMwnQccRLiBcXm4v4y8pFfaNzjRwswUQjnMV5KyIV+dSyQQAh9sBedFJjeWm1HSy3UXFZvyc6gQIG5GR5uGWkyxYHdCxBFMYFj2xmEzoLwF7omu5CXF0TUdYxb5hvUBMEqEEKIwte2VE=
|
||||
node_js: 4
|
||||
- CXX=g++-4.8
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||
|
|
|
@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
|||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
|
||||
You can however override the jsbin link with one that's customized to this
|
||||
specific element:
|
||||
|
||||
jsbin=https://jsbin.com/cagaye/edit?html,output
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
|
|||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
|
@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
|
|||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, #40
|
||||
Fixes #32, fixes #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-slider",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "A material design-style slider",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"authors": "The Polymer Authors",
|
||||
|
@ -29,9 +29,10 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,113 +17,106 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
|
||||
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
|
||||
<link rel="import" href="../../paper-styles/color.html">
|
||||
<link rel="import" href="../paper-slider.html">
|
||||
|
||||
<style is="custom-style">
|
||||
body {
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
<style is="custom-style" include="demo-pages-shared-styles">
|
||||
paper-slider {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
paper-slider.blue {
|
||||
--paper-slider-knob-color: var(--paper-light-blue-500);
|
||||
--paper-slider-active-color: var(--paper-light-blue-500);
|
||||
}
|
||||
|
||||
paper-slider.red {
|
||||
--paper-slider-knob-color: var(--paper-red-500);
|
||||
--paper-slider-active-color: var(--paper-red-500);
|
||||
}
|
||||
|
||||
paper-slider.green {
|
||||
--paper-slider-knob-color: var(--paper-green-500);
|
||||
--paper-slider-active-color: var(--paper-green-500);
|
||||
}
|
||||
|
||||
paper-slider.orange {
|
||||
--paper-slider-knob-color: var(--paper-orange-500);
|
||||
--paper-slider-active-color: var(--paper-orange-500);
|
||||
--paper-slider-pin-color: var(--paper-orange-500);
|
||||
}
|
||||
|
||||
.caption {
|
||||
padding-left: 12px;
|
||||
color: #a0a0a0;
|
||||
}
|
||||
|
||||
#grade {
|
||||
--paper-slider-secondary-color: var(--paper-red-a200);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body unresolved>
|
||||
<div class="vertical-section-container">
|
||||
<h4>Default</h4>
|
||||
<div class="vertical-section">
|
||||
<div>Oxygen</div>
|
||||
<paper-slider value="21" id="test"></paper-slider><br><br>
|
||||
<div>Argon</div>
|
||||
<paper-slider value="1"></paper-slider><br><br>
|
||||
<div>Hydrogen</div>
|
||||
<paper-slider value="0"></paper-slider><br><br>
|
||||
<div>Nitrogen</div>
|
||||
<paper-slider value="78" secondary-progress="85"></paper-slider><br><br>
|
||||
<div>Sprinkles</div>
|
||||
<paper-slider disabled value="33"></paper-slider>
|
||||
</div>
|
||||
<div class="vertical-section-container centered">
|
||||
<h3>paper-sliders can have values, secondary progress values, or be disabled.</h3>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<paper-slider value="21"></paper-slider>
|
||||
<paper-slider value="0"></paper-slider>
|
||||
<paper-slider value="50" secondary-progress="85"></paper-slider>
|
||||
<paper-slider disabled value="33"></paper-slider>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h3>They can be editable, and styled using custom properties</h3>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
paper-slider.red {
|
||||
--paper-slider-knob-color: var(--paper-red-500);
|
||||
--paper-slider-active-color: var(--paper-red-500);
|
||||
}
|
||||
paper-slider.green {
|
||||
--paper-slider-knob-color: var(--paper-green-500);
|
||||
--paper-slider-active-color: var(--paper-green-500);
|
||||
}
|
||||
paper-slider.blue {
|
||||
--paper-slider-knob-color: var(--paper-light-blue-500);
|
||||
--paper-slider-active-color: var(--paper-light-blue-500);
|
||||
}
|
||||
</style>
|
||||
|
||||
<h4>Editable</h4>
|
||||
<div class="vertical-section">
|
||||
<div>
|
||||
<div>R</div>
|
||||
<paper-slider class="red" value="23" max="255" editable></paper-slider>
|
||||
</div>
|
||||
<div>
|
||||
<div>G</div>
|
||||
<paper-slider class="green" value="183" max="255" editable></paper-slider>
|
||||
</div>
|
||||
<div>
|
||||
<div>B</div>
|
||||
<paper-slider class="blue" value="211" max="255" editable></paper-slider>
|
||||
</div>
|
||||
<div>
|
||||
<div>α</div>
|
||||
<paper-slider max="1.0" step="0.01" editable></paper-slider>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Labelled pins</h4>
|
||||
<div class="vertical-section">
|
||||
<div>Brightness</div><br>
|
||||
<paper-slider pin value="20" class="orange"></paper-slider>
|
||||
<div>Ratings: <span id="ratingsLabel" class="caption"></span></div><br>
|
||||
<paper-slider id="ratings" pin snaps max="10" max-markers="10" step="1" value="5" class="orange"></paper-slider>
|
||||
<div>Grade: <span id="gradeLabel" class="caption"></span></div><br>
|
||||
<paper-slider id="grade" pin value="20" secondary-progress="70" class="blue"></paper-slider>
|
||||
</div>
|
||||
<h3>The pins can be labelled</h3>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.caption {
|
||||
padding-left: 12px;
|
||||
color: #a0a0a0;
|
||||
}
|
||||
#grade {
|
||||
--paper-slider-secondary-color: var(--paper-red-a200);
|
||||
}
|
||||
</style>
|
||||
<div>Brightness</div><br>
|
||||
<paper-slider pin value="20"></paper-slider>
|
||||
<div>Ratings: <span id="ratingsLabel" class="caption"></span></div><br>
|
||||
<paper-slider id="ratings" pin snaps max="10" max-markers="10" step="1" value="5"></paper-slider>
|
||||
<div>Grade: <span id="gradeLabel" class="caption"></span></div><br>
|
||||
<paper-slider id="grade" pin value="20" secondary-progress="70"></paper-slider>
|
||||
|
||||
<script>
|
||||
document.addEventListener('WebComponentsReady', function() {
|
||||
var ratings = document.querySelector('#ratings');
|
||||
ratings.addEventListener('value-change', function() {
|
||||
document.querySelector('#ratingsLabel').textContent = ratings.value;
|
||||
});
|
||||
|
||||
var grade = document.querySelector('#grade');
|
||||
grade.addEventListener('value-change', function() {
|
||||
var label = (grade.value < grade.secondaryProgress) ? "Fail" : "Pass" ;
|
||||
document.querySelector('#gradeLabel').textContent = grade.value + " (" + label + ")";
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('WebComponentsReady', function() {
|
||||
var ratings = document.querySelector('#ratings');
|
||||
ratings.addEventListener('value-change', function() {
|
||||
document.querySelector('#ratingsLabel').textContent = ratings.value;
|
||||
});
|
||||
|
||||
var ratings = document.querySelector('#ratings');
|
||||
ratings.addEventListener('value-change', function() {
|
||||
document.querySelector('#ratingsLabel').textContent = ratings.value;
|
||||
var grade = document.querySelector('#grade');
|
||||
grade.addEventListener('value-change', function() {
|
||||
var label = (grade.value < grade.secondaryProgress) ? "Fail" : "Pass" ;
|
||||
document.querySelector('#gradeLabel').textContent = grade.value + " (" + label + ")";
|
||||
});
|
||||
});
|
||||
|
||||
var grade = document.querySelector('#grade');
|
||||
grade.addEventListener('value-change', function() {
|
||||
var label = (grade.value < grade.secondaryProgress) ? "Fail" : "Pass" ;
|
||||
document.querySelector('#gradeLabel').textContent = grade.value + " (" + label + ")";
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -331,7 +331,7 @@ Custom property | Description | Default
|
|||
on-up="_resetKnob"
|
||||
on-track="_onTrack"
|
||||
on-transitionend="_knobTransitionEnd">
|
||||
<div id="sliderKnobInner" value$="[[pinValue]]"></div>
|
||||
<div id="sliderKnobInner" value$="[[immediateValue]]"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -529,7 +529,6 @@ Custom property | Description | Default
|
|||
|
||||
_positionKnob: function(ratio) {
|
||||
this._setImmediateValue(this._calcStep(this._calcKnobPosition(ratio)));
|
||||
this._setPinValue(this.immediateValue);
|
||||
this._setRatio(this._calcRatio(this.immediateValue));
|
||||
|
||||
this.$.sliderKnob.style.left = (this.ratio * 100) + '%';
|
||||
|
@ -583,7 +582,6 @@ Custom property | Description | Default
|
|||
// update knob's position
|
||||
var translateX = ((this._calcRatio(this.immediateValue) * this._w) - this._knobstartx);
|
||||
this.translate3d(translateX + 'px', 0, 0, this.$.sliderKnob);
|
||||
this._setPinValue(immediateValue);
|
||||
},
|
||||
|
||||
_trackEnd: function() {
|
||||
|
@ -598,9 +596,6 @@ Custom property | Description | Default
|
|||
|
||||
this.fire('change');
|
||||
},
|
||||
_setPinValue: function (value) {
|
||||
this.pinValue = value;
|
||||
},
|
||||
|
||||
_knobdown: function(event) {
|
||||
this._expandKnob();
|
||||
|
@ -638,6 +633,9 @@ Custom property | Description | Default
|
|||
|
||||
// cancel selection
|
||||
event.preventDefault();
|
||||
|
||||
// set the focus manually because we will called prevent default
|
||||
this.focus();
|
||||
},
|
||||
|
||||
_knobTransitionEnd: function(event) {
|
||||
|
@ -650,7 +648,7 @@ Custom property | Description | Default
|
|||
if (!this.snaps) {
|
||||
this._setMarkers([]);
|
||||
}
|
||||
var steps = Math.floor((this.max - this.min) / this.step);
|
||||
var steps = Math.round((this.max - this.min) / this.step);
|
||||
if (steps > maxMarkers) {
|
||||
steps = maxMarkers;
|
||||
}
|
||||
|
@ -724,9 +722,9 @@ Custom property | Description | Default
|
|||
if (this.hasRipple()) {
|
||||
// note, ripple must be un-hidden prior to setting `holdDown`
|
||||
if (receivedFocusFromKeyboard) {
|
||||
this._ripple.removeAttribute('hidden');
|
||||
this._ripple.style.display = '';
|
||||
} else {
|
||||
this._ripple.setAttribute('hidden', '');
|
||||
this._ripple.style.display = 'none';
|
||||
}
|
||||
this._ripple.holdDown = receivedFocusFromKeyboard;
|
||||
}
|
||||
|
|
|
@ -65,6 +65,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
assert.isAbove(ripple.offsetWidth, 0);
|
||||
});
|
||||
|
||||
test('slider has focus after click event on bar"', function() {
|
||||
var focusSpy = sinon.spy(slider, 'focus');
|
||||
MockInteractions.down(slider.$.sliderBar);
|
||||
assert.isTrue(focusSpy.called);
|
||||
});
|
||||
|
||||
a11ySuite('trivialSlider');
|
||||
|
||||
});
|
||||
|
|
|
@ -221,6 +221,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
});
|
||||
});
|
||||
|
||||
test('decimal markers', function(done) {
|
||||
slider.min = 0;
|
||||
slider.max = 0.7;
|
||||
slider.snap = true;
|
||||
slider.step = 0.1;
|
||||
slider.maxMarkers = 10;
|
||||
flush(function() {
|
||||
assert.equal(slider.markers.length, 7);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
<!DOCTYPE html><!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
|
@ -7,9 +6,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
--><html><head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
<title>Tests</title>
|
||||
|
@ -19,8 +16,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<script>
|
||||
WCT.loadSuites([
|
||||
'basic.html',
|
||||
'a11y.html'
|
||||
'a11y.html',
|
||||
'basic.html?dom=shadow',
|
||||
'a11y.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
</body></html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue