GroupLayerView2D-63UXVU7J.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. import {
  2. r
  3. } from "./chunk-MEH62CCE.js";
  4. import {
  5. u,
  6. y as y2
  7. } from "./chunk-ZOTXRPGC.js";
  8. import "./chunk-MH3GGTFP.js";
  9. import "./chunk-2ZACOQZJ.js";
  10. import "./chunk-JBMHQ5RK.js";
  11. import "./chunk-WBWQJQK4.js";
  12. import "./chunk-DBT4KOKX.js";
  13. import "./chunk-2GP5D74I.js";
  14. import "./chunk-SCZJ2KEY.js";
  15. import "./chunk-EPMXCACW.js";
  16. import "./chunk-T2SKWJGU.js";
  17. import "./chunk-UO3LS2M5.js";
  18. import "./chunk-H2VOWDMO.js";
  19. import "./chunk-QISOH77W.js";
  20. import "./chunk-UWKVAZQ6.js";
  21. import "./chunk-3WXSWAUV.js";
  22. import "./chunk-27YO3FKC.js";
  23. import "./chunk-EQNT4A7P.js";
  24. import "./chunk-XO5VJRK4.js";
  25. import "./chunk-4OM3EX6P.js";
  26. import "./chunk-3OFVLRSL.js";
  27. import "./chunk-IQBIGNPU.js";
  28. import "./chunk-K7B6OWCU.js";
  29. import "./chunk-UDYHZLTE.js";
  30. import "./chunk-RWQH5X3O.js";
  31. import "./chunk-4VZNS7N2.js";
  32. import "./chunk-O3JQY77G.js";
  33. import "./chunk-E3G7BRZB.js";
  34. import "./chunk-EDHROVWI.js";
  35. import "./chunk-3IRT3YKJ.js";
  36. import "./chunk-RDMCXRET.js";
  37. import "./chunk-PJNBFKPF.js";
  38. import "./chunk-C7742RNZ.js";
  39. import {
  40. U,
  41. l
  42. } from "./chunk-BWATQC2Y.js";
  43. import "./chunk-3WQOA5CB.js";
  44. import "./chunk-FZQZIM7U.js";
  45. import "./chunk-CZBRZ6SU.js";
  46. import "./chunk-VGWC3IKZ.js";
  47. import "./chunk-UVVU4UUO.js";
  48. import "./chunk-X4SA4ELJ.js";
  49. import {
  50. n as n2,
  51. t as t2
  52. } from "./chunk-PE24J2I5.js";
  53. import "./chunk-AUOH2VSO.js";
  54. import "./chunk-ZYRIJWLX.js";
  55. import "./chunk-RYY6632W.js";
  56. import "./chunk-DW42UVIT.js";
  57. import "./chunk-TJNOJH33.js";
  58. import "./chunk-YAEIHDJH.js";
  59. import "./chunk-OSHI574D.js";
  60. import "./chunk-44GMIOGP.js";
  61. import "./chunk-75U5LM2V.js";
  62. import "./chunk-ZHRAUKVQ.js";
  63. import "./chunk-RZK6A2GY.js";
  64. import {
  65. j
  66. } from "./chunk-4NQ74ZR6.js";
  67. import "./chunk-X4LLOW7U.js";
  68. import "./chunk-Z4JTBD7M.js";
  69. import "./chunk-MSBIHK67.js";
  70. import "./chunk-HZRKBTHJ.js";
  71. import "./chunk-CXCDYJ5R.js";
  72. import "./chunk-GAOW3WRZ.js";
  73. import "./chunk-QCKFNSN2.js";
  74. import {
  75. e,
  76. n5 as n,
  77. y3 as y
  78. } from "./chunk-6SOHRC7T.js";
  79. import "./chunk-U2XHEJM7.js";
  80. import "./chunk-SQOPWYIT.js";
  81. import "./chunk-6KZ2LTDA.js";
  82. import "./chunk-V6P2MAQQ.js";
  83. import "./chunk-E5O6P5I2.js";
  84. import "./chunk-SPWQ3AWG.js";
  85. import "./chunk-2TIUKVZN.js";
  86. import {
  87. t
  88. } from "./chunk-YXWMMD76.js";
  89. import "./chunk-S5KM4IGW.js";
  90. // node_modules/@arcgis/core/views/layers/GroupLayerView.js
  91. var p = class extends u {
  92. constructor(i2) {
  93. super(i2), this.type = "group", this.layerViews = new j();
  94. }
  95. _allLayerViewVisibility(i2) {
  96. this.layerViews.forEach((e2) => {
  97. e2.visible = i2;
  98. });
  99. }
  100. initialize() {
  101. this.handles.add([this.layerViews.on("change", (i2) => this._layerViewsChangeHandler(i2)), l(() => this.layer.visibilityMode, () => this._applyVisibility(() => this._allLayerViewVisibility(this.visible), () => this._applyExclusiveVisibility(null)), U), l(() => this.visible, (i2) => {
  102. this._applyVisibility(() => this._allLayerViewVisibility(i2), () => {
  103. });
  104. }, U)], "grouplayerview"), this._layerViewsChangeHandler({ target: null, added: this.layerViews.toArray(), removed: [], moved: [] });
  105. }
  106. set layerViews(i2) {
  107. this._set("layerViews", n2(i2, this._get("layerViews")));
  108. }
  109. get updatingProgress() {
  110. return 0 === this.layerViews.length ? 1 : this.layerViews.reduce((i2, e2) => i2 + e2.updatingProgress, 0) / this.layerViews.length;
  111. }
  112. isUpdating() {
  113. return this.layerViews.some((i2) => i2.updating);
  114. }
  115. _hasLayerViewVisibleOverrides() {
  116. return this.layerViews.some((i2) => i2._isOverridden("visible"));
  117. }
  118. _findLayerViewForLayer(i2) {
  119. return i2 && this.layerViews.find((e2) => e2.layer === i2);
  120. }
  121. _firstVisibleOnLayerOrder() {
  122. const i2 = this.layer.layers.find((i3) => {
  123. var _a;
  124. return (_a = this._findLayerViewForLayer(i3)) == null ? void 0 : _a.visible;
  125. });
  126. return i2 && this._findLayerViewForLayer(i2);
  127. }
  128. _applyExclusiveVisibility(i2) {
  129. t(i2) && (i2 = this._firstVisibleOnLayerOrder(), t(i2) && this.layerViews.length > 0 && (i2 = this._findLayerViewForLayer(this.layer.layers.getItemAt(0)))), this.layerViews.forEach((e2) => {
  130. e2.visible = e2 === i2;
  131. });
  132. }
  133. _layerViewsChangeHandler(i2) {
  134. this.handles.remove("grouplayerview:visible"), this.handles.add(this.layerViews.map((i3) => l(() => i3.visible, (e3) => this._applyVisibility(() => {
  135. e3 !== this.visible && (i3.visible = this.visible);
  136. }, () => this._applyExclusiveVisibility(e3 ? i3 : null)), U)).toArray(), "grouplayerview:visible");
  137. const e2 = i2.added[i2.added.length - 1];
  138. this._applyVisibility(() => this._allLayerViewVisibility(this.visible), () => this._applyExclusiveVisibility((e2 == null ? void 0 : e2.visible) ? e2 : null));
  139. }
  140. _applyVisibility(i2, e2) {
  141. var _a, _b;
  142. this._hasLayerViewVisibleOverrides() && ("inherited" === ((_a = this.layer) == null ? void 0 : _a.visibilityMode) ? i2() : "exclusive" === ((_b = this.layer) == null ? void 0 : _b.visibilityMode) && e2());
  143. }
  144. };
  145. e([y({ cast: t2 })], p.prototype, "layerViews", null), e([y({ readOnly: true })], p.prototype, "updatingProgress", null), e([y()], p.prototype, "view", void 0), p = e([n("esri.views.layers.GroupLayerView")], p);
  146. var n3 = p;
  147. // node_modules/@arcgis/core/views/2d/layers/GroupLayerView2D.js
  148. var a = class extends y2(n3) {
  149. constructor() {
  150. super(...arguments), this.container = new r();
  151. }
  152. attach() {
  153. this._updateStageChildren(), this.handles.add(this.layerViews.on("after-changes", () => this._updateStageChildren()), "grouplayerview2d");
  154. }
  155. detach() {
  156. this.handles.remove("grouplayerview2d"), this.container.removeAllChildren();
  157. }
  158. update(e2) {
  159. }
  160. moveStart() {
  161. }
  162. viewChange() {
  163. }
  164. moveEnd() {
  165. }
  166. _updateStageChildren() {
  167. this.container.removeAllChildren(), this.layerViews.forEach((e2, r2) => this.container.addChildAt(e2.container, r2));
  168. }
  169. };
  170. a = e([n("esri.views.2d.layers.GroupLayerView2D")], a);
  171. var i = a;
  172. export {
  173. i as default
  174. };
  175. //# sourceMappingURL=GroupLayerView2D-63UXVU7J.js.map