if-show.js 544 B

1234567891011121314151617
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.ifShow = void 0;
  4. function ifShow(show, container, creator, removeChildren, removeHandler) {
  5. if (removeChildren === void 0) { removeChildren = true; }
  6. if (removeHandler === void 0) { removeHandler = function (g) {
  7. g.node().removeChildren();
  8. }; }
  9. if (show) {
  10. return creator(container);
  11. }
  12. if (removeChildren)
  13. removeHandler(container);
  14. return null;
  15. }
  16. exports.ifShow = ifShow;
  17. //# sourceMappingURL=if-show.js.map