a zip code crypto-currency system good for red ONLY

activator-base.js 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. (function (factory) {
  2. if (typeof module === "object" && typeof module.exports === "object") {
  3. var v = factory(require, exports);
  4. if (v !== undefined) module.exports = v;
  5. }
  6. else if (typeof define === "function" && define.amd) {
  7. define(["require", "exports"], factory);
  8. }
  9. })(function (require, exports) {
  10. "use strict";
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var ActivatorBase = (function () {
  13. function ActivatorBase() {
  14. }
  15. return ActivatorBase;
  16. }());
  17. exports.ActivatorBase = ActivatorBase;
  18. function isActivatedDisabled(ev, activatableEle) {
  19. if (!activatableEle || !activatableEle.parentNode) {
  20. return true;
  21. }
  22. if (!ev) {
  23. return false;
  24. }
  25. if (ev.defaultPrevented) {
  26. return true;
  27. }
  28. var targetEle = ev.target;
  29. for (var i = 0; i < 4; i++) {
  30. if (!targetEle) {
  31. break;
  32. }
  33. if (targetEle.hasAttribute('disable-activated')) {
  34. return true;
  35. }
  36. targetEle = targetEle.parentElement;
  37. }
  38. return false;
  39. }
  40. exports.isActivatedDisabled = isActivatedDisabled;
  41. });
  42. //# sourceMappingURL=activator-base.js.map