@polymer/iron-overlay-behavior
Advanced tools
Comparing version 3.0.0-pre.14 to 3.0.0-pre.15
@@ -72,3 +72,3 @@ /** | ||
value: false, | ||
observer: '_openedChanged' | ||
observer: '_openedChanged', | ||
} | ||
@@ -78,3 +78,5 @@ | ||
listeners: {'transitionend': '_onTransitionend'}, | ||
listeners: { | ||
'transitionend': '_onTransitionend', | ||
}, | ||
@@ -81,0 +83,0 @@ created: function() { |
@@ -45,3 +45,6 @@ /** | ||
*/ | ||
withBackdrop: {observer: '_withBackdropChanged', type: Boolean}, | ||
withBackdrop: { | ||
observer: '_withBackdropChanged', | ||
type: Boolean, | ||
}, | ||
@@ -52,3 +55,6 @@ /** | ||
*/ | ||
noAutoFocus: {type: Boolean, value: false}, | ||
noAutoFocus: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
@@ -58,3 +64,6 @@ /** | ||
*/ | ||
noCancelOnEscKey: {type: Boolean, value: false}, | ||
noCancelOnEscKey: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
@@ -64,3 +73,6 @@ /** | ||
*/ | ||
noCancelOnOutsideClick: {type: Boolean, value: false}, | ||
noCancelOnOutsideClick: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
@@ -76,3 +88,3 @@ /** | ||
// behaviors can override this. | ||
type: Object | ||
type: Object, | ||
}, | ||
@@ -83,3 +95,6 @@ | ||
*/ | ||
restoreFocusOnClose: {type: Boolean, value: false}, | ||
restoreFocusOnClose: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
@@ -91,3 +106,5 @@ /** | ||
*/ | ||
allowClickThrough: {type: Boolean}, | ||
allowClickThrough: { | ||
type: Boolean, | ||
}, | ||
@@ -97,3 +114,5 @@ /** | ||
*/ | ||
alwaysOnTop: {type: Boolean}, | ||
alwaysOnTop: { | ||
type: Boolean, | ||
}, | ||
@@ -106,3 +125,5 @@ /** | ||
*/ | ||
scrollAction: {type: String}, | ||
scrollAction: { | ||
type: String, | ||
}, | ||
@@ -114,3 +135,6 @@ /** | ||
*/ | ||
_manager: {type: Object, value: IronOverlayManager}, | ||
_manager: { | ||
type: Object, | ||
value: IronOverlayManager, | ||
}, | ||
@@ -121,3 +145,5 @@ /** | ||
*/ | ||
_focusedChild: {type: Object} | ||
_focusedChild: { | ||
type: Object, | ||
} | ||
@@ -124,0 +150,0 @@ }, |
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
var lastTouchPosition = {pageX: 0, pageY: 0}; | ||
var lastTouchPosition = { pageX: 0, pageY: 0 }; | ||
/** | ||
@@ -42,2 +42,5 @@ * Used to avoid computing event.path and filter scrollable nodes (better perf). | ||
]; | ||
// must be defined for modulizer | ||
var _boundScrollHandler; | ||
var currentLockingElement; | ||
@@ -60,5 +63,3 @@ /** | ||
*/ | ||
export function currentLockingElement() { | ||
return _lockingElements[_lockingElements.length - 1]; | ||
} | ||
export { currentLockingElement }; | ||
@@ -73,6 +74,7 @@ /** | ||
export function elementIsScrollLocked(element) { | ||
var currentLockingElement = currentLockingElement; | ||
var lockingElement = currentLockingElement; | ||
if (currentLockingElement === undefined) | ||
if (lockingElement === undefined) { | ||
return false; | ||
} | ||
@@ -89,5 +91,4 @@ var scrollLocked; | ||
scrollLocked = !!currentLockingElement && | ||
currentLockingElement !== element && | ||
!_composedTreeContains(currentLockingElement, element); | ||
scrollLocked = !!lockingElement && lockingElement !== element && | ||
!_composedTreeContains(lockingElement, element); | ||
@@ -124,2 +125,4 @@ if (scrollLocked) { | ||
_lockingElements.push(element); | ||
currentLockingElement = | ||
_lockingElements[_lockingElements.length - 1]; | ||
@@ -147,2 +150,4 @@ _lockedElementCache = []; | ||
_lockingElements.splice(index, 1); | ||
currentLockingElement = | ||
_lockingElements[_lockingElements.length - 1]; | ||
@@ -188,5 +193,5 @@ _lockedElementCache = []; | ||
for (contentIndex = 0; contentIndex < contentElements.length; | ||
++contentIndex) { | ||
++contentIndex) { | ||
distributedNodes = | ||
dom(contentElements[contentIndex]).getDistributedNodes(); | ||
dom(contentElements[contentIndex]).getDistributedNodes(); | ||
@@ -228,3 +233,3 @@ for (nodeIndex = 0; nodeIndex < distributedNodes.length; ++nodeIndex) { | ||
_boundScrollHandler = | ||
_boundScrollHandler || _scrollInteractionHandler.bind(Polymer.IronScrollManager); | ||
_boundScrollHandler || _scrollInteractionHandler.bind(undefined); | ||
for (var i = 0, l = scrollEvents.length; i < l; i++) { | ||
@@ -234,5 +239,5 @@ // NOTE: browsers that don't support objects as third arg will | ||
document.addEventListener( | ||
scrollEvents[i], | ||
_boundScrollHandler, | ||
{capture: true, passive: false}); | ||
scrollEvents[i], | ||
_boundScrollHandler, | ||
{ capture: true, passive: false }); | ||
} | ||
@@ -246,5 +251,5 @@ } | ||
document.removeEventListener( | ||
scrollEvents[i], | ||
_boundScrollHandler, | ||
{capture: true, passive: false}); | ||
scrollEvents[i], | ||
_boundScrollHandler, | ||
{ capture: true, passive: false }); | ||
} | ||
@@ -283,3 +288,3 @@ } | ||
return !_getScrollingNode( | ||
lastScrollableNodes, info.deltaX, info.deltaY); | ||
lastScrollableNodes, info.deltaX, info.deltaY); | ||
} | ||
@@ -339,9 +344,9 @@ | ||
canScroll = deltaY < 0 ? | ||
node.scrollTop > 0 : | ||
node.scrollTop < node.scrollHeight - node.clientHeight; | ||
node.scrollTop > 0 : | ||
node.scrollTop < node.scrollHeight - node.clientHeight; | ||
} else { | ||
// delta < 0 is scroll left, delta > 0 is scroll right. | ||
canScroll = deltaX < 0 ? | ||
node.scrollLeft > 0 : | ||
node.scrollLeft < node.scrollWidth - node.clientWidth; | ||
node.scrollLeft > 0 : | ||
node.scrollLeft < node.scrollWidth - node.clientWidth; | ||
} | ||
@@ -364,3 +369,3 @@ if (canScroll) { | ||
export function _getScrollInfo(event) { | ||
var info = {deltaX: event.deltaX, deltaY: event.deltaY}; | ||
var info = { deltaX: event.deltaX, deltaY: event.deltaY }; | ||
// Already available. | ||
@@ -367,0 +372,0 @@ if ('deltaX' in event) { |
@@ -19,8 +19,8 @@ { | ||
"webmat": "^0.2.0", | ||
"@polymer/iron-component-page": "^3.0.0-pre.14", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.14", | ||
"@polymer/iron-flex-layout": "^3.0.0-pre.14", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.14", | ||
"@polymer/iron-component-page": "^3.0.0-pre.15", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.15", | ||
"@polymer/iron-flex-layout": "^3.0.0-pre.15", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.15", | ||
"wct-browser-legacy": "^0.0.1-pre.11", | ||
"@webcomponents/webcomponentsjs": "^2.0.0-0" | ||
"@webcomponents/webcomponentsjs": "^2.0.0-beta.2" | ||
}, | ||
@@ -31,3 +31,3 @@ "scripts": { | ||
}, | ||
"version": "3.0.0-pre.14", | ||
"version": "3.0.0-pre.15", | ||
"resolutions": { | ||
@@ -37,3 +37,4 @@ "inherits": "2.0.3", | ||
"supports-color": "3.1.2", | ||
"type-detect": "1.0.0" | ||
"type-detect": "1.0.0", | ||
"@webcomponents/webcomponentsjs": "2.0.0-beta.2" | ||
}, | ||
@@ -43,7 +44,7 @@ "main": "iron-overlay-behavior.js", | ||
"dependencies": { | ||
"@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.14", | ||
"@polymer/iron-fit-behavior": "^3.0.0-pre.14", | ||
"@polymer/iron-resizable-behavior": "^3.0.0-pre.14", | ||
"@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.15", | ||
"@polymer/iron-fit-behavior": "^3.0.0-pre.15", | ||
"@polymer/iron-resizable-behavior": "^3.0.0-pre.15", | ||
"@polymer/polymer": "^3.0.0-pre.13" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
197585
29
2255