mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
8119b930e4
commit
cbb6337b41
74 changed files with 2195 additions and 1393 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-behaviors",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "Provides a set of behaviors for the iron elements",
|
||||
"private": true,
|
||||
"authors": [
|
||||
|
@ -28,11 +28,11 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
||||
"_release": "1.0.8",
|
||||
"_release": "1.0.9",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.8",
|
||||
"commit": "663ad706b43989f4961d945b8116cf4db346532f"
|
||||
"tag": "v1.0.9",
|
||||
"commit": "4b8cab62a4916cc4b1dbd262cbb7eb1eec624b6f"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-behaviors",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "Provides a set of behaviors for the iron elements",
|
||||
"private": true,
|
||||
"authors": [
|
||||
|
|
|
@ -125,33 +125,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
}
|
||||
},
|
||||
|
||||
_eventSourceIsPrimaryInput: function(event) {
|
||||
event = event.detail.sourceEvent || event;
|
||||
|
||||
// Always true for non-mouse events....
|
||||
if (!this._mouseEventRe.test(event.type)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// http://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
|
||||
if ('buttons' in event) {
|
||||
return event.buttons === 1;
|
||||
}
|
||||
|
||||
// http://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/which
|
||||
if (typeof event.which === 'number') {
|
||||
return event.which < 2;
|
||||
}
|
||||
|
||||
// http://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
|
||||
return event.button < 1;
|
||||
},
|
||||
|
||||
_downHandler: function(event) {
|
||||
if (!this._eventSourceIsPrimaryInput(event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._setPointerDown(true);
|
||||
this._setPressed(true);
|
||||
this._setReceivedFocusFromKeyboard(false);
|
||||
|
|
|
@ -41,20 +41,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
activeTarget = fixture('TrivialActiveState');
|
||||
});
|
||||
|
||||
suite('non-primary pointer input source', function() {
|
||||
test('does not cause state to change', function() {
|
||||
var rightClickMouseEvent = new CustomEvent('mousedown');
|
||||
rightClickMouseEvent.buttons = 2;
|
||||
activeTarget.dispatchEvent(rightClickMouseEvent);
|
||||
expect(activeTarget.pressed).to.be.equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
suite('active state with toggles attribute', function() {
|
||||
setup(function() {
|
||||
activeTarget = fixture('ToggleActiveState');
|
||||
});
|
||||
|
||||
suite('when down', function() {
|
||||
test('is pressed', function() {
|
||||
MockInteractions.down(activeTarget);
|
||||
expect(activeTarget.hasAttribute('pressed')).to.be.eql(true);
|
||||
});
|
||||
});
|
||||
|
||||
suite('when clicked', function() {
|
||||
test('is activated', function(done) {
|
||||
MockInteractions.downAndUp(activeTarget, function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue