highlight.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.VennElementHighlight = void 0;
  4. var tslib_1 = require("tslib");
  5. var g2_1 = require("@antv/g2");
  6. var util_1 = require("../util");
  7. var ElementHighlightAction = (0, g2_1.getActionClass)('element-highlight');
  8. var VennElementHighlight = /** @class */ (function (_super) {
  9. tslib_1.__extends(VennElementHighlight, _super);
  10. function VennElementHighlight() {
  11. return _super !== null && _super.apply(this, arguments) || this;
  12. }
  13. /**
  14. * 同步所有元素的位置
  15. */
  16. VennElementHighlight.prototype.syncElementsPos = function () {
  17. (0, util_1.placeElementsOrdered)(this.context.view);
  18. };
  19. /** 高亮图形元素 */
  20. VennElementHighlight.prototype.highlight = function () {
  21. _super.prototype.highlight.call(this);
  22. this.syncElementsPos();
  23. };
  24. /** toggle 图形元素高亮状态 */
  25. VennElementHighlight.prototype.toggle = function () {
  26. _super.prototype.toggle.call(this);
  27. this.syncElementsPos();
  28. };
  29. /** 清楚 */
  30. VennElementHighlight.prototype.clear = function () {
  31. _super.prototype.clear.call(this);
  32. this.syncElementsPos();
  33. };
  34. /** 重置 */
  35. VennElementHighlight.prototype.reset = function () {
  36. _super.prototype.reset.call(this);
  37. this.syncElementsPos();
  38. };
  39. return VennElementHighlight;
  40. }(ElementHighlightAction));
  41. exports.VennElementHighlight = VennElementHighlight;
  42. //# sourceMappingURL=highlight.js.map