aurelia-materialize-bridge
Version:
Aurelia interface to http://materializecss.com/
33 lines • 1.38 kB
JavaScript
define(["require", "exports", "tslib", "../aurelia"], function (require, exports, tslib_1, au) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MdParallax = /** @class */ (function () {
function MdParallax(element) {
this.element = element;
}
MdParallax.prototype.attached = function () {
this.element.classList.add("parallax");
var options = {
responsiveThreshold: this.responsiveThreshold
};
au.cleanOptions(options);
this.instance = new M.Parallax(this.element, options);
};
MdParallax.prototype.detached = function () {
this.instance.destroy();
this.element.classList.remove("parallax");
};
tslib_1.__decorate([
au.ato.bindable.numberMd({ defaultBindingMode: au.bindingMode.oneTime }),
tslib_1.__metadata("design:type", Number)
], MdParallax.prototype, "responsiveThreshold", void 0);
MdParallax = tslib_1.__decorate([
au.customAttribute("md-parallax"),
au.autoinject,
tslib_1.__metadata("design:paramtypes", [Element])
], MdParallax);
return MdParallax;
}());
exports.MdParallax = MdParallax;
});
//# sourceMappingURL=parallax.js.map