@boulevard/duration-select
Advanced tools
Comparing version 1.0.0-alpha.14 to 1.0.0-alpha.15
{ | ||
"name": "@boulevard/duration-select", | ||
"version": "1.0.0-alpha.14", | ||
"version": "1.0.0-alpha.15", | ||
"description": "A component for intelligently selecting durations.", | ||
@@ -5,0 +5,0 @@ "main": "index.ts", |
@@ -39,2 +39,4 @@ import { customElement, eventOptions, html, LitElement, property, PropertyValues, query } from 'lit-element'; | ||
wheelEventThrottle: number = 80; | ||
@property() | ||
preventWheelPropagation: boolean = true; | ||
// TODO(Jeff) - add in optional formatting for hours and minutes | ||
@@ -101,3 +103,2 @@ // This will also require additional logic to determine singular or plural | ||
super.disconnectedCallback(); | ||
if ('ontouchstart' in document) { | ||
@@ -231,5 +232,5 @@ document.removeEventListener('touchstart', this._touchstart); | ||
// Get pasted data via clipboard API | ||
const pastedData: string = e.clipboardData.getData('Text'); | ||
this._updateDurationSelect(pastedData, e); | ||
if (e.clipboardData) { | ||
this._updateDurationSelect(e.clipboardData.getData('Text'), e); | ||
} | ||
} | ||
@@ -247,2 +248,4 @@ | ||
if (this._isFocused) { | ||
this.preventWheelPropagation && this._preventDefaultAndProp(e); | ||
if (Date.now() >= this._lastWheelTime + this.wheelEventThrottle) { | ||
@@ -249,0 +252,0 @@ this._lastWheelTime = Date.now(); |
16641
379