Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
UxButton.prototype.onMouseDown = function (e) {
if (this.button.classList.contains('ux-button--ripple')) {
if (this.ripple === null) {
this.ripple = new core_1.PaperRipple();
this.button.appendChild(this.ripple.$);
}
if (this.button.classList.contains('ux-button--fab')) {
this.ripple.center = true;
this.ripple.round = true;
}
this.ripple.downAction(e);
}
return true;
};
UxButton.prototype.onMouseUp = function () {
UxOption.prototype.addWave = function (e, autoEnd) {
var target = this.element;
if (target.classList.contains('ripple')) {
if (target.ripple === null || target.ripple === undefined) {
target.ripple = new PaperRipple();
target.appendChild(target.ripple.$);
}
target.ripple.downAction(e);
if (autoEnd) {
setTimeout(removeWave, 125, target);
}
else {
new ElementEvents(PLATFORM.global).subscribeOnce('mouseup', function () {
target.ripple.upAction();
}, true);
}
}
};
__decorate([
addWave(e, autoEnd) {
const target = this.element;
if (target.classList.contains('ripple')) {
if (target.ripple === null || target.ripple === undefined) {
target.ripple = new PaperRipple();
target.appendChild(target.ripple.$);
}
target.ripple.downAction(e);
if (autoEnd) {
setTimeout(removeWave, 125, target);
}
else {
new ElementEvents(PLATFORM.global).subscribeOnce('mouseup', () => {
target.ripple.upAction();
}, true);
}
}
}
};
UxRadio.prototype.onMouseDown = function (e) {
var _this = this;
if (e.button !== 0 || this.isDisabled) {
return;
}
if (this.element.classList.contains('ripple')) {
if (this.ripple === null) {
this.ripple = new core_1.PaperRipple();
var container = this.element.querySelector('.ripplecontainer');
if (container != null) {
container.appendChild(this.ripple.$);
}
}
this.ripple.center = true;
this.ripple.round = true;
this.ripple.downAction(e);
var winEvents_1 = new aurelia_framework_1.ElementEvents(window);
var upAction = function () {
_this.ripple.upAction();
winEvents_1.disposeAll();
};
winEvents_1.subscribe('blur', upAction);
winEvents_1.subscribe('mouseup', upAction, true);
}
onMouseDown(e) {
if (e.button !== 0 || this.isDisabled) {
return;
}
if (this.element.classList.contains('ripple')) {
if (this.ripple === null) {
this.ripple = new PaperRipple();
const container = this.element.querySelector('.ripplecontainer');
if (container != null) {
container.appendChild(this.ripple.$);
}
}
this.ripple.center = true;
this.ripple.round = true;
this.ripple.downAction(e);
const winEvents = new ElementEvents(window);
const upAction = () => {
this.ripple.upAction();
winEvents.disposeAll();
};
winEvents.subscribe('blur', upAction);
winEvents.subscribe('mouseup', upAction, true);
}
onMouseDown(e) {
if (e.button !== 0 || this.isDisabled) {
return;
}
if (this.element.classList.contains('ripple')) {
if (this.ripple === null) {
this.ripple = new PaperRipple();
const container = this.element.querySelector('.ripplecontainer');
if (container != null) {
container.appendChild(this.ripple.$);
}
}
this.ripple.center = true;
this.ripple.round = true;
this.ripple.downAction(e);
const winEvents = new ElementEvents(window);
const upAction = () => {
this.ripple.upAction();
winEvents.disposeAll();
};
winEvents.subscribe('blur', upAction);
winEvents.subscribe('mouseup', upAction, true);
}
UxRadio.prototype.onMouseDown = function (e) {
var _this = this;
if (e.button !== 0 || this.isDisabled) {
return;
}
if (this.element.classList.contains('ripple')) {
if (this.ripple === null) {
this.ripple = new PaperRipple();
var container = this.element.querySelector('.ripplecontainer');
if (container != null) {
container.appendChild(this.ripple.$);
}
}
this.ripple.center = true;
this.ripple.round = true;
this.ripple.downAction(e);
var winEvents_1 = new ElementEvents(window);
var upAction = function () {
_this.ripple.upAction();
winEvents_1.disposeAll();
};
winEvents_1.subscribe('blur', upAction);
winEvents_1.subscribe('mouseup', upAction, true);
}
public onMouseDown(e: MouseEvent) {
if (this.button.classList.contains('ux-button--ripple')) {
if (this.ripple === null) {
this.ripple = new PaperRipple();
this.button.appendChild(this.ripple.$);
}
if (this.button.classList.contains('ux-button--fab')) {
this.ripple.center = true;
this.ripple.round = true;
}
this.ripple.downAction(e);
}
return true;
}
public onMouseDown(e: MouseEvent) {
if (e.button !== 0 || this.isDisabled) {
return;
}
if (this.element.classList.contains('ripple')) {
if (this.ripple === null) {
this.ripple = new PaperRipple();
const container = this.element.querySelector('.ripplecontainer');
if (container != null) {
container.appendChild(this.ripple.$);
}
}
this.ripple.center = true;
this.ripple.round = true;
this.ripple.downAction(e);
const winEvents = new ElementEvents(window as any);
const upAction = () => {
this.ripple!.upAction();
winEvents.disposeAll();
};
UxCheckbox.prototype.onMouseDown = function (e) {
var _this = this;
if (e.button !== 0 || this.isDisabled) {
return;
}
if (this.element.classList.contains('ripple')) {
if (this.ripple === null) {
this.ripple = new core_1.PaperRipple();
var container = this.element.querySelector('.ripplecontainer');
if (container != null) {
container.appendChild(this.ripple.$);
}
}
this.ripple.center = true;
this.ripple.round = true;
this.ripple.downAction(e);
var winEvents_1 = new aurelia_templating_1.ElementEvents(window);
var upAction = function () {
_this.ripple.upAction();
winEvents_1.disposeAll();
};
winEvents_1.subscribe('blur', upAction);
winEvents_1.subscribe('mouseup', upAction, true);
}