GroupLayerView2D-H64XIDHT.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. import {
  2. r
  3. } from "./chunk-LLEV4BTU.js";
  4. import "./chunk-H3QCF24A.js";
  5. import {
  6. f,
  7. u
  8. } from "./chunk-MNZXIBJ7.js";
  9. import "./chunk-YJKEIUMW.js";
  10. import "./chunk-JH3PLIM6.js";
  11. import "./chunk-FCDUTNBY.js";
  12. import "./chunk-LL6JU3GU.js";
  13. import "./chunk-ZIWBDWEW.js";
  14. import "./chunk-IQNZZCQJ.js";
  15. import "./chunk-Q4LKAPDF.js";
  16. import "./chunk-TODU7HVH.js";
  17. import "./chunk-23ONSYIH.js";
  18. import "./chunk-3T4BXU2T.js";
  19. import "./chunk-YLVXZ2PS.js";
  20. import "./chunk-EE6TL7XD.js";
  21. import "./chunk-GDB2KX4Y.js";
  22. import "./chunk-546QCRS4.js";
  23. import "./chunk-QXZVBSBH.js";
  24. import "./chunk-773XI6MQ.js";
  25. import "./chunk-WFSV2B2I.js";
  26. import "./chunk-J525NRN3.js";
  27. import "./chunk-MI7HWWFL.js";
  28. import "./chunk-ZHRMTKME.js";
  29. import "./chunk-MFFE4I2S.js";
  30. import "./chunk-LGW7TID4.js";
  31. import "./chunk-G5AI6ZNE.js";
  32. import "./chunk-FYNVVMWY.js";
  33. import "./chunk-Q52DVFYK.js";
  34. import "./chunk-HBMVUVZX.js";
  35. import "./chunk-CRGVDJI6.js";
  36. import "./chunk-6P6NA7JB.js";
  37. import "./chunk-XLV7RUSE.js";
  38. import "./chunk-NTUXR253.js";
  39. import "./chunk-RMX2AZ4P.js";
  40. import "./chunk-NE3ESGA6.js";
  41. import {
  42. U,
  43. l
  44. } from "./chunk-YIS6BAC3.js";
  45. import "./chunk-7XXXCK2A.js";
  46. import "./chunk-WJW5DUN6.js";
  47. import "./chunk-PJ7ZQ4VD.js";
  48. import "./chunk-WDLTDV2L.js";
  49. import "./chunk-TERAW6FT.js";
  50. import "./chunk-WEMIK25H.js";
  51. import "./chunk-7N4X6GF3.js";
  52. import "./chunk-JXW4QTJA.js";
  53. import "./chunk-UXF37FQ4.js";
  54. import "./chunk-ZOEK6QHJ.js";
  55. import "./chunk-XNLG7T2T.js";
  56. import "./chunk-IR4PV7VK.js";
  57. import "./chunk-2Z6LERTI.js";
  58. import "./chunk-OWVBLVP3.js";
  59. import {
  60. n as n2,
  61. t as t2
  62. } from "./chunk-AFZ7XSEW.js";
  63. import "./chunk-YBSUITLL.js";
  64. import {
  65. j
  66. } from "./chunk-ALDCDSPV.js";
  67. import "./chunk-DT6EAZQ5.js";
  68. import "./chunk-HNOZUNJ4.js";
  69. import "./chunk-PDKDCAAD.js";
  70. import "./chunk-ECW2QABR.js";
  71. import "./chunk-GCDJLKH4.js";
  72. import "./chunk-MRJEICT6.js";
  73. import {
  74. d,
  75. e,
  76. n2 as n
  77. } from "./chunk-Y3WMVFTW.js";
  78. import "./chunk-SAS7RONY.js";
  79. import "./chunk-WSRBH7BF.js";
  80. import "./chunk-IHXECKQQ.js";
  81. import "./chunk-ULGDPLM2.js";
  82. import "./chunk-EMJ4ZSM2.js";
  83. import "./chunk-IKP3YN53.js";
  84. import {
  85. t
  86. } from "./chunk-GZT4BVFP.js";
  87. import "./chunk-A5ICIBVI.js";
  88. // node_modules/@arcgis/core/views/layers/GroupLayerView.js
  89. var p = class extends u {
  90. constructor(i2) {
  91. super(i2), this.type = "group", this.layerViews = new j();
  92. }
  93. _allLayerViewVisibility(i2) {
  94. this.layerViews.forEach((e2) => {
  95. e2.visible = i2;
  96. });
  97. }
  98. initialize() {
  99. 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) => {
  100. this._applyVisibility(() => this._allLayerViewVisibility(i2), () => {
  101. });
  102. }, U)], "grouplayerview"), this._layerViewsChangeHandler({ target: null, added: this.layerViews.toArray(), removed: [], moved: [] });
  103. }
  104. set layerViews(i2) {
  105. this._set("layerViews", n2(i2, this._get("layerViews")));
  106. }
  107. get updatingProgress() {
  108. return this.layerViews.length === 0 ? 1 : this.layerViews.reduce((i2, e2) => i2 + e2.updatingProgress, 0) / this.layerViews.length;
  109. }
  110. isUpdating() {
  111. return this.layerViews.some((i2) => i2.updating);
  112. }
  113. _hasLayerViewVisibleOverrides() {
  114. return this.layerViews.some((i2) => i2._isOverridden("visible"));
  115. }
  116. _findLayerViewForLayer(i2) {
  117. return i2 && this.layerViews.find((e2) => e2.layer === i2);
  118. }
  119. _firstVisibleOnLayerOrder() {
  120. const i2 = this.layer.layers.find((i3) => this._findLayerViewForLayer(i3)?.visible);
  121. return i2 && this._findLayerViewForLayer(i2);
  122. }
  123. _applyExclusiveVisibility(i2) {
  124. t(i2) && (i2 = this._firstVisibleOnLayerOrder(), t(i2) && this.layerViews.length > 0 && (i2 = this._findLayerViewForLayer(this.layer.layers.getItemAt(0)))), this.layerViews.forEach((e2) => {
  125. e2.visible = e2 === i2;
  126. });
  127. }
  128. _layerViewsChangeHandler(i2) {
  129. this.handles.remove("grouplayerview:visible"), this.handles.add(this.layerViews.map((i3) => l(() => i3.visible, (e3) => this._applyVisibility(() => {
  130. e3 !== this.visible && (i3.visible = this.visible);
  131. }, () => this._applyExclusiveVisibility(e3 ? i3 : null)), U)).toArray(), "grouplayerview:visible");
  132. const e2 = i2.added[i2.added.length - 1];
  133. this._applyVisibility(() => this._allLayerViewVisibility(this.visible), () => this._applyExclusiveVisibility(e2?.visible ? e2 : null));
  134. }
  135. _applyVisibility(i2, e2) {
  136. this._hasLayerViewVisibleOverrides() && (this.layer?.visibilityMode === "inherited" ? i2() : this.layer?.visibilityMode === "exclusive" && e2());
  137. }
  138. };
  139. e([d({ cast: t2 })], p.prototype, "layerViews", null), e([d({ readOnly: true })], p.prototype, "updatingProgress", null), e([d()], p.prototype, "view", void 0), p = e([n("esri.views.layers.GroupLayerView")], p);
  140. var n3 = p;
  141. // node_modules/@arcgis/core/views/2d/layers/GroupLayerView2D.js
  142. var a = class extends f(n3) {
  143. constructor() {
  144. super(...arguments), this.container = new r();
  145. }
  146. attach() {
  147. this._updateStageChildren(), this.handles.add(this.layerViews.on("after-changes", () => this._updateStageChildren()), "grouplayerview2d");
  148. }
  149. detach() {
  150. this.handles.remove("grouplayerview2d"), this.container.removeAllChildren();
  151. }
  152. update(e2) {
  153. }
  154. moveStart() {
  155. }
  156. viewChange() {
  157. }
  158. moveEnd() {
  159. }
  160. _updateStageChildren() {
  161. this.container.removeAllChildren(), this.layerViews.forEach((e2, r2) => this.container.addChildAt(e2.container, r2));
  162. }
  163. };
  164. a = e([n("esri.views.2d.layers.GroupLayerView2D")], a);
  165. var i = a;
  166. export {
  167. i as default
  168. };
  169. //# sourceMappingURL=GroupLayerView2D-H64XIDHT.js.map