UNPKG

@visactor/vtable

Version:

canvas table width high performance

24 lines (19 loc) 935 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.onBeforeAttributeUpdateForInvertHighlight = void 0; const vutils_1 = require("@visactor/vutils"); function onBeforeAttributeUpdateForInvertHighlight(val, attribute) { var _a, _b; const graphic = this; if (graphic.shadowRoot && graphic.shadowRoot.childrenCount && ((0, vutils_1.isValid)(val.width) || (0, vutils_1.isValid)(val.height))) { const shadowRect = graphic.shadowRoot.findChildrenByName("shadow-rect")[0]; shadowRect && shadowRect.setAttributes({ width: null !== (_a = val.width) && void 0 !== _a ? _a : shadowRect.attribute.width, height: null !== (_b = val.height) && void 0 !== _b ? _b : shadowRect.attribute.height }); } } exports.onBeforeAttributeUpdateForInvertHighlight = onBeforeAttributeUpdateForInvertHighlight; //# sourceMappingURL=invert-highlight.js.map