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

123456789101112131415161718192021222324252627282930313233343536
  1. 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; }
  2. export default {
  3. bar: 0,
  4. bottom: 0,
  5. footer: 0,
  6. insetFooter: 0,
  7. left: 0,
  8. right: 0,
  9. top: 0,
  10. components: {
  11. bar: {},
  12. bottom: {},
  13. footer: {},
  14. insetFooter: {},
  15. left: {},
  16. right: {},
  17. top: {}
  18. },
  19. bind: function bind(uid, target, value) {
  20. if (!this.components[target]) return;
  21. this.components[target] = _defineProperty({}, uid, value);
  22. this.update(target);
  23. },
  24. unbind: function unbind(uid, target) {
  25. if (this.components[target][uid] == null) return;
  26. delete this.components[target][uid];
  27. this.update(target);
  28. },
  29. update: function update(target) {
  30. this[target] = Object.values(this.components[target]).reduce(function (acc, cur) {
  31. return acc + cur;
  32. }, 0);
  33. }
  34. };
  35. //# sourceMappingURL=application.js.map