import { isValid } from "@visactor/vutils";

export function onBeforeAttributeUpdateForInvertHighlight(val, attribute) {
    var _a, _b;
    const graphic = this;
    if (graphic.shadowRoot && graphic.shadowRoot.childrenCount && (isValid(val.width) || 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
        });
    }
}
//# sourceMappingURL=invert-highlight.js.map