Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

application.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  6. exports.default = {
  7. bar: 0,
  8. bottom: 0,
  9. footer: 0,
  10. insetFooter: 0,
  11. left: 0,
  12. right: 0,
  13. top: 0,
  14. components: {
  15. bar: {},
  16. bottom: {},
  17. footer: {},
  18. insetFooter: {},
  19. left: {},
  20. right: {},
  21. top: {}
  22. },
  23. bind: function bind(uid, target, value) {
  24. if (!this.components[target]) return;
  25. this.components[target] = _defineProperty({}, uid, value);
  26. this.update(target);
  27. },
  28. unbind: function unbind(uid, target) {
  29. if (this.components[target][uid] == null) return;
  30. delete this.components[target][uid];
  31. this.update(target);
  32. },
  33. update: function update(target) {
  34. this[target] = Object.values(this.components[target]).reduce(function (acc, cur) {
  35. return acc + cur;
  36. }, 0);
  37. }
  38. };
  39. //# sourceMappingURL=application.js.map