5cdbc92ae7e8c1888a00e5f5da4438c95b72555af53a2581b63e119a5373853cc278418a3dcfacc59daa4449f13b59fbbcac53abc930870b8bb2c4de691dae 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. 'use strict';
  2. exports.__esModule = true;
  3. var _element = require('./../../../../helpers/dom/element');
  4. var _base = require('./_base');
  5. var _base2 = _interopRequireDefault(_base);
  6. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  7. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  9. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  10. /**
  11. * A overlay that renders ALL available rows & columns positioned on top of the original Walkontable instance and all other overlays.
  12. * Used for debugging purposes to see if the other overlays (that render only part of the rows & columns) are positioned correctly
  13. *
  14. * @class DebugOverlay
  15. */
  16. var DebugOverlay = function (_Overlay) {
  17. _inherits(DebugOverlay, _Overlay);
  18. /**
  19. * @param {Walkontable} wotInstance
  20. */
  21. function DebugOverlay(wotInstance) {
  22. _classCallCheck(this, DebugOverlay);
  23. var _this = _possibleConstructorReturn(this, (DebugOverlay.__proto__ || Object.getPrototypeOf(DebugOverlay)).call(this, wotInstance));
  24. _this.clone = _this.makeClone(_base2.default.CLONE_DEBUG);
  25. _this.clone.wtTable.holder.style.opacity = 0.4;
  26. _this.clone.wtTable.holder.style.textShadow = '0 0 2px #ff0000';
  27. (0, _element.addClass)(_this.clone.wtTable.holder.parentNode, 'wtDebugVisible');
  28. return _this;
  29. }
  30. return DebugOverlay;
  31. }(_base2.default);
  32. _base2.default.registerOverlay(_base2.default.CLONE_DEBUG, DebugOverlay);
  33. exports.default = DebugOverlay;