@antv/l7-component 2.15.1 → 2.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/es/assets/iconfont/iconfont.js +10 -17
  2. package/es/control/baseControl/buttonControl.js +9 -42
  3. package/es/control/baseControl/control.js +24 -53
  4. package/es/control/baseControl/popperControl.js +10 -24
  5. package/es/control/baseControl/selectControl.js +6 -45
  6. package/es/control/exportImage.js +76 -116
  7. package/es/control/fullscreen.js +20 -53
  8. package/es/control/geoLocate.js +36 -66
  9. package/es/control/layerSwitch.js +0 -31
  10. package/es/control/logo.js +2 -14
  11. package/es/control/mapTheme.js +7 -32
  12. package/es/control/mouseLocation.js +2 -23
  13. package/es/control/scale.js +6 -29
  14. package/es/control/zoom.js +0 -23
  15. package/es/index.js +2 -12
  16. package/es/marker-layer.js +41 -75
  17. package/es/marker.js +29 -83
  18. package/es/popup/layerPopup.js +31 -82
  19. package/es/popup/popup.js +48 -127
  20. package/es/utils/anchor.js +3 -7
  21. package/es/utils/popper.js +15 -64
  22. package/es/utils/screenfull.js +23 -52
  23. package/lib/assets/iconfont/iconfont.js +10 -17
  24. package/lib/control/baseControl/buttonControl.js +9 -52
  25. package/lib/control/baseControl/control.js +24 -68
  26. package/lib/control/baseControl/index.js +0 -8
  27. package/lib/control/baseControl/popperControl.js +10 -29
  28. package/lib/control/baseControl/selectControl.js +6 -60
  29. package/lib/control/exportImage.js +76 -125
  30. package/lib/control/fullscreen.js +20 -60
  31. package/lib/control/geoLocate.js +36 -75
  32. package/lib/control/layerSwitch.js +0 -36
  33. package/lib/control/logo.js +2 -26
  34. package/lib/control/mapTheme.js +7 -42
  35. package/lib/control/mouseLocation.js +2 -33
  36. package/lib/control/scale.js +6 -40
  37. package/lib/control/zoom.js +0 -33
  38. package/lib/index.js +0 -41
  39. package/lib/marker-layer.js +39 -86
  40. package/lib/marker.js +29 -91
  41. package/lib/popup/layerPopup.js +29 -94
  42. package/lib/popup/popup.js +48 -139
  43. package/lib/utils/anchor.js +4 -9
  44. package/lib/utils/icon.js +0 -2
  45. package/lib/utils/popper.js +14 -71
  46. package/lib/utils/screenfull.js +23 -54
  47. package/package.json +6 -6
@@ -2,32 +2,28 @@
2
2
  window._iconfont_svg_string_3580659 = '<svg><symbol id="l7-icon-area1" viewBox="0 0 1024 1024"><path d="M796.444444 56.888889a113.777778 113.777778 0 0 1 43.064889 219.136l38.798223 466.261333a113.777778 113.777778 0 1 1-133.518223 145.237334H279.210667a113.777778 113.777778 0 1 1-60.302223-137.272889L697.856 227.555556A113.777778 113.777778 0 0 1 796.444444 56.888889z m56.888889 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-682.666666 0a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m577.592889-534.072889L269.198222 796.444444c4.152889 7.168 7.509333 14.791111 10.012445 22.812445h465.578666a114.119111 114.119111 0 0 1 65.479111-71.224889l-38.798222-466.261333a112.924444 112.924444 0 0 1-23.210666-7.964445zM796.444444 125.155556a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-area" viewBox="0 0 1024 1024"><path d="M796.444444 56.888889a113.777778 113.777778 0 0 1 43.008 219.136l38.855112 466.261333a113.777778 113.777778 0 0 1-16.497778 224.540445L853.333333 967.111111a113.777778 113.777778 0 0 1-108.544-79.644444H279.210667a113.834667 113.834667 0 0 1-100.067556 79.36L170.666667 967.111111a113.777778 113.777778 0 0 1-17.066667-226.304l30.492444-351.175111a113.777778 113.777778 0 0 1 34.986667-218.680889L227.555556 170.666667a113.777778 113.777778 0 0 1 99.896888 59.221333l355.84-71.395556a113.777778 113.777778 0 0 1 104.675556-101.262222L796.444444 56.888889z m56.888889 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-682.666666 0a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m526.051555-582.314666L340.650667 296.903111a113.891556 113.891556 0 0 1-88.462223 98.645333l-30.947555 355.84c27.477333 13.653333 48.64 38.115556 58.026667 67.754667h465.521777a114.119111 114.119111 0 0 1 65.536-71.168l-38.855111-466.261333a113.948444 113.948444 0 0 1-74.752-56.206222zM227.555556 238.933333a45.511111 45.511111 0 1 0 0 91.022223 45.511111 45.511111 0 0 0 0-91.022223z m568.888888-113.777777a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-delete" viewBox="0 0 1024 1024"><path d="M705.422222 85.333333a34.133333 34.133333 0 0 1 34.133334 34.133334V227.555556h136.533333a34.133333 34.133333 0 0 1 0 68.266666h-25.543111l-24.348445 610.076445a34.133333 34.133333 0 0 1-34.133333 32.768H231.936a34.133333 34.133333 0 0 1-34.076444-32.768L173.340444 295.822222H147.911111a34.133333 34.133333 0 1 1 0-68.266666H284.444444V119.466667a34.133333 34.133333 0 0 1 34.133334-34.133334h386.844444zM241.720889 295.822222l22.983111 574.577778h494.535111l23.04-574.577778H241.720889zM671.288889 153.6H352.711111V227.555556h318.577778V153.6z" ></path></symbol><symbol id="l7-icon-color" viewBox="0 0 1024 1024"><path d="M512 56.888889c9.841778 0 19.626667 0.341333 29.354667 0.910222 69.176889 4.437333 119.068444 62.577778 124.302222 131.072l0.455111 9.386667c0.739556 44.600889 15.303111 84.935111 44.999111 114.631111 27.022222 27.022222 62.805333 41.528889 102.570667 44.430222l12.060444 0.568889c72.476444 1.194667 135.793778 52.451556 140.458667 124.757333 1.137778 18.261333 1.251556 36.807111 0.170667 55.637334-13.198222 233.585778-211.399111 424.220444-445.326223 428.714666L512 967.111111a455.111111 455.111111 0 0 1-455.054222-464.156444c4.551111-233.927111 195.185778-432.128 428.771555-445.326223C494.535111 57.116444 503.296 56.888889 512 56.888889z m0 68.266667a385.706667 385.706667 0 0 0-22.414222 0.625777C291.726222 136.988444 129.080889 305.948444 125.155556 504.263111c-4.152889 212.366222 163.100444 387.185778 372.508444 394.353778l13.425778 0.227555 8.533333-0.113777c198.371556-3.811556 367.331556-166.456889 378.538667-364.373334a396.174222 396.174222 0 0 0-0.170667-47.331555c-1.991111-31.232-29.127111-56.604444-67.128889-60.472889l-8.248889-0.455111-14.051555-0.682667c-56.547556-4.209778-107.406222-25.884444-145.806222-64.284444-38.855111-38.798222-60.416-90.225778-64.284445-145.749334l-0.910222-21.333333c-2.901333-38.001778-28.785778-66.048-60.302222-68.096A433.891556 433.891556 0 0 0 512 125.155556zM438.044444 682.666667a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z m-170.666666-227.555556a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z m142.222222-227.555555a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z" ></path></symbol><symbol id="l7-icon-base-map" viewBox="0 0 1024 1024"><path d="M923.761778 115.029333A34.133333 34.133333 0 0 1 967.111111 147.911111v624.128a34.133333 34.133333 0 0 1-22.186667 32.028445l-278.755555 103.992888a34.133333 34.133333 0 0 1-23.665778 0.056889L381.724444 812.714667a34.133333 34.133333 0 0 0-23.665777 0.113777L102.968889 908.060444a34.133333 34.133333 0 0 1-45.738667-26.965333L56.888889 876.088889V251.960889a34.133333 34.133333 0 0 1 22.186667-32.028445l278.755555-103.992888a34.133333 34.133333 0 0 1 20.992-0.967112l266.183111 72.988445a34.133333 34.133333 0 0 0 18.204445 0zM403.911111 192.625778v555.576889l216.177778 79.075555V251.960889l-216.177778-59.335111z m-68.266667 4.380444L125.155556 275.569778v551.310222l210.432-78.506667V197.006222zM898.844444 192.853333l-210.545777 58.936889v575.089778l210.545777-78.563556V192.853333z" ></path></symbol><symbol id="l7-icon-dot" viewBox="0 0 1024 1024"><path d="M341.333333 739.555556a113.777778 113.777778 0 0 1 8.533334 227.271111L341.333333 967.111111a113.777778 113.777778 0 0 1-8.533333-227.271111L341.333333 739.555556z m0 68.266666a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM910.222222 341.333333a113.777778 113.777778 0 0 1 8.533334 227.271111L910.222222 568.888889a113.777778 113.777778 0 0 1-8.533333-227.271111L910.222222 341.333333z m0 68.266667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM227.555556 56.888889a113.777778 113.777778 0 0 1 8.533333 227.271111L227.555556 284.444444a113.777778 113.777778 0 0 1-8.533334-227.271111L227.555556 56.888889z m0 68.266667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-display" viewBox="0 0 1024 1024"><path d="M512 170.666667c284.444444 0 455.111111 227.555556 455.111111 341.333333s-170.666667 341.333333-455.111111 341.333333-455.111111-227.555556-455.111111-341.333333 170.666667-341.333333 455.111111-341.333333z m0 68.266666C303.729778 238.933333 125.155556 401.237333 125.155556 512c0 110.762667 178.574222 273.066667 386.844444 273.066667s386.844444-162.304 386.844444-273.066667c0-110.762667-178.574222-273.066667-386.844444-273.066667zM512 341.333333a170.666667 170.666667 0 1 1 0 341.333334 170.666667 170.666667 0 0 1 0-341.333334z m0 68.266667a102.4 102.4 0 1 0 0 204.8 102.4 102.4 0 0 0 0-204.8z" ></path></symbol><symbol id="l7-icon-enlarge" viewBox="0 0 1024 1024"><path d="M546.133333 147.911111l-0.056889 329.955556H876.088889a34.133333 34.133333 0 0 1 0 68.266666H546.076444v329.955556a34.133333 34.133333 0 0 1-68.266666 0V546.133333H147.911111a34.133333 34.133333 0 1 1 0-68.266666h329.898667V147.911111a34.133333 34.133333 0 0 1 68.266666 0z" ></path></symbol><symbol id="l7-icon-export-picture" viewBox="0 0 1024 1024"><path d="M883.873684 161.684211a32.336842 32.336842 0 0 1 32.336842 32.336842v582.063158a32.336842 32.336842 0 0 1-32.336842 32.336842H86.231579a32.336842 32.336842 0 0 1-32.336842-32.336842V194.021053a32.336842 32.336842 0 0 1 32.336842-32.336842h797.642105z m-32.336842 64.673684H118.568421v517.389473h170.792421a32.175158 32.175158 0 0 1 0.431158-0.646736l3.772632-4.473264 330.320842-330.374736a32.336842 32.336842 0 0 1 38.588631-5.389474l4.473263 3.018105 184.589474 147.725474V226.357895z m-202.428631 248.131368L379.850105 743.747368H851.536842v-107.304421l-202.428631-161.953684zM323.368421 323.368421a107.789474 107.789474 0 1 1 0 215.578947 107.789474 107.789474 0 0 1 0-215.578947z m0 64.673684a43.115789 43.115789 0 1 0 0 86.231579 43.115789 43.115789 0 0 0 0-86.231579z" ></path></symbol><symbol id="l7-icon-exit-fullscreen" viewBox="0 0 1024 1024"><path d="M841.955556 591.644444a34.133333 34.133333 0 0 1 5.518222 67.811556l-5.518222 0.455111h-133.745778l192 192.056889a34.133333 34.133333 0 0 1-38.343111 55.182222l-5.176889-2.958222-4.721778-3.982222L659.911111 708.266667V841.955556a34.133333 34.133333 0 0 1-28.615111 33.678222L625.777778 876.088889a34.133333 34.133333 0 0 1-33.678222-28.615111L591.644444 841.955556V625.777778a34.133333 34.133333 0 0 1 28.615112-33.678222L625.777778 591.644444h216.177778z m-443.733334 0a34.133333 34.133333 0 0 1 33.678222 28.615112L432.355556 625.777778v216.177778a34.133333 34.133333 0 0 1-67.811556 5.518222L364.088889 841.955556v-133.745778l-192.056889 192a34.133333 34.133333 0 0 1-52.224-43.52l3.982222-4.721778L315.847111 659.911111H182.044444a34.133333 34.133333 0 0 1-33.678222-28.615111L147.911111 625.777778a34.133333 34.133333 0 0 1 28.615111-33.678222L182.044444 591.644444H398.222222zM167.310222 119.808l4.721778 3.982222L364.088889 315.847111V182.044444a34.133333 34.133333 0 0 1 28.615111-33.678222L398.222222 147.911111a34.133333 34.133333 0 0 1 33.678222 28.615111L432.355556 182.044444V398.222222a34.133333 34.133333 0 0 1-28.615112 33.678222L398.222222 432.355556H182.044444a34.133333 34.133333 0 0 1-5.518222-67.811556L182.044444 364.088889h133.802667L123.790222 172.032a34.133333 34.133333 0 0 1 43.52-52.224z m732.899556 3.982222a34.133333 34.133333 0 0 1 3.982222 43.52l-3.982222 4.721778L708.266667 364.088889H841.955556a34.133333 34.133333 0 0 1 33.678222 28.615111L876.088889 398.222222a34.133333 34.133333 0 0 1-28.615111 33.678222L841.955556 432.355556H625.777778a34.133333 34.133333 0 0 1-33.678222-28.615112L591.644444 398.222222V182.044444a34.133333 34.133333 0 0 1 67.811556-5.518222l0.455111 5.518222v133.802667l192.056889-192.056889a34.133333 34.133333 0 0 1 48.241778 0z" ></path></symbol><symbol id="l7-icon-line" viewBox="0 0 1024 1024"><path d="M853.333333 56.888889a113.777778 113.777778 0 0 1 8.533334 227.271111L853.333333 284.444444c-19.000889 0-36.864-4.664889-52.622222-12.856888l-529.123555 529.066666a113.777778 113.777778 0 0 1-92.387556 166.115556L170.666667 967.111111a113.777778 113.777778 0 0 1-8.533334-227.271111L170.666667 739.555556c19.000889 0 36.864 4.664889 52.622222 12.856888l529.123555-529.066666a113.777778 113.777778 0 0 1 92.387556-166.115556L853.333333 56.888889zM170.666667 807.822222a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m682.666666-682.666666a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-layer" viewBox="0 0 1024 1024"><path d="M767.089778 625.777778l180.167111 82.773333a34.133333 34.133333 0 0 1 4.892444 59.278222l-4.892444 2.730667-420.977778 193.422222a34.133333 34.133333 0 0 1-22.983111 1.991111l-5.575111-1.991111-420.977778-193.422222a34.133333 34.133333 0 0 1-4.892444-59.278222l4.892444-2.730667L256.853333 625.777778l81.749334 37.546666L172.771556 739.555556 512 895.374222 851.171556 739.555556l-165.831112-76.231112 81.749334-37.546666z m0-227.555556l180.167111 82.773334a34.133333 34.133333 0 0 1 4.892444 59.278222l-4.892444 2.730666-420.977778 193.422223a34.133333 34.133333 0 0 1-22.983111 1.991111l-5.575111-1.991111-420.977778-193.422223a34.133333 34.133333 0 0 1-4.892444-59.278222l4.892444-2.730666L256.853333 398.222222l81.749334 37.546667-165.831111 76.174222L512 667.818667l339.171556-155.875556-165.831112-76.174222L767.089778 398.222222zM497.720889 60.017778a34.133333 34.133333 0 0 1 28.558222 0l420.977778 193.422222a34.133333 34.133333 0 0 1 0 62.008889l-420.977778 193.422222a34.133333 34.133333 0 0 1-28.558222 0l-420.977778-193.422222a34.133333 34.133333 0 0 1 0-62.008889zM512 128.568889L172.771556 284.387556 512 440.263111l339.171556-155.875555L512 128.568889z" ></path></symbol><symbol id="l7-icon-narrow" viewBox="0 0 1024 1024"><path d="M910.222222 512a34.133333 34.133333 0 0 1-34.133333 34.133333H147.911111a34.133333 34.133333 0 1 1 0-68.266666h728.177778a34.133333 34.133333 0 0 1 34.133333 34.133333z" ></path></symbol><symbol id="l7-icon-fullscreen" viewBox="0 0 1024 1024"><path d="M645.176889 597.674667l4.721778 3.982222L841.955556 793.6l0.056888-133.688889a34.133333 34.133333 0 0 1 28.615112-33.678222L876.088889 625.777778a34.133333 34.133333 0 0 1 33.678222 28.615111L910.222222 659.911111v216.177778a34.133333 34.133333 0 0 1-28.615111 33.678222L876.088889 910.222222h-216.177778a34.133333 34.133333 0 0 1-5.518222-67.811555l5.518222-0.455111h133.745778l-192-192.056889a34.133333 34.133333 0 0 1 43.52-52.224z m-222.833778 3.982222a34.133333 34.133333 0 0 1 3.982222 43.52l-3.982222 4.721778L230.286222 841.955556H364.088889a34.133333 34.133333 0 0 1 33.678222 28.615111L398.222222 876.088889a34.133333 34.133333 0 0 1-28.615111 33.678222L364.088889 910.222222H147.911111a34.133333 34.133333 0 0 1-33.678222-28.615111L113.777778 876.088889v-216.177778a34.133333 34.133333 0 0 1 67.811555-5.518222l0.455111 5.518222-0.056888 133.745778 192.113777-192a34.133333 34.133333 0 0 1 48.241778 0zM364.088889 113.777778a34.133333 34.133333 0 0 1 5.518222 67.811555L364.088889 182.044444H230.343111l192 192.056889a34.133333 34.133333 0 0 1-43.52 52.224l-4.721778-3.982222-192.113777-192.056889L182.044444 364.088889a34.133333 34.133333 0 0 1-28.615111 33.678222L147.911111 398.222222a34.133333 34.133333 0 0 1-33.678222-28.615111L113.777778 364.088889V147.911111a34.133333 34.133333 0 0 1 28.615111-33.678222L147.911111 113.777778h216.177778z m512 0a34.133333 34.133333 0 0 1 33.678222 28.615111L910.222222 147.911111v216.177778a34.133333 34.133333 0 0 1-67.811555 5.518222L841.955556 364.088889l-0.056889-133.745778-192 192a34.133333 34.133333 0 0 1-52.224-43.52l3.982222-4.721778L793.6 182.044444H659.911111a34.133333 34.133333 0 0 1-33.678222-28.615111L625.777778 147.911111a34.133333 34.133333 0 0 1 28.615111-33.678222L659.911111 113.777778h216.177778z" ></path></symbol><symbol id="l7-icon-hide" viewBox="0 0 1024 1024"><path d="M875.52 87.836444a34.133333 34.133333 0 0 1 7.281778 43.121778l-3.527111 5.006222-682.666667 796.444445a34.133333 34.133333 0 0 1-55.409778-39.367111l3.527111-5.006222 97.166223-113.379556C123.164444 697.969778 56.888889 582.940444 56.888889 512c0-113.777778 170.666667-341.333333 455.111111-341.333333a496.64 496.64 0 0 1 208.952889 45.112889l106.439111-124.188445a34.133333 34.133333 0 0 1 48.128-3.754667z m-38.684444 202.524445C921.031111 362.951111 967.111111 452.835556 967.111111 512c0 113.777778-170.666667 341.333333-455.111111 341.333333-50.631111 0-97.678222-7.224889-140.8-19.740444l50.232889-58.595556A417.393778 417.393778 0 0 0 512 785.066667c208.270222 0 386.844444-162.304 386.844444-273.066667 0-52.849778-40.675556-117.418667-105.813333-170.496l43.804445-51.2zM512 238.933333C303.729778 238.933333 125.155556 401.237333 125.155556 512c0 66.787556 64.853333 152.291556 162.133333 209.692444L377.173333 616.675556a170.666667 170.666667 0 0 1 217.713778-253.895112l78.620445-91.704888A432.924444 432.924444 0 0 0 512 238.933333z m166.684444 236.088889a170.666667 170.666667 0 0 1-177.664 207.303111l177.607112-207.303111zM512 409.6a102.4 102.4 0 0 0-88.746667 153.486222L548.864 416.426667A102.172444 102.172444 0 0 0 512 409.6z" ></path></symbol><symbol id="l7-icon-rectangle" viewBox="0 0 1024 1024"><path d="M170.666667 56.888889a113.777778 113.777778 0 0 1 108.544 79.644444H853.333333a34.133333 34.133333 0 0 1 33.678223 28.615111L887.466667 170.666667v574.122666a113.777778 113.777778 0 1 1-142.677334 142.734223L170.666667 887.466667a34.133333 34.133333 0 0 1-33.678223-28.615111L136.533333 853.333333V279.210667A113.777778 113.777778 0 0 1 170.666667 56.888889z m682.666666 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-34.133333-603.022222H279.210667a114.062222 114.062222 0 0 1-74.353778 74.410667L204.8 819.2h539.989333a114.062222 114.062222 0 0 1 74.410667-74.410667V204.8zM170.666667 125.155556a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-ranging" viewBox="0 0 1024 1024"><path d="M723.171556 50.403556l250.424888 250.424888a31.061333 31.061333 0 0 1 0 43.918223L344.746667 973.596444a31.061333 31.061333 0 0 1-43.918223 0L50.403556 723.171556a31.061333 31.061333 0 0 1 0-43.918223L679.253333 50.403556a31.061333 31.061333 0 0 1 43.918223 0z m-21.959112 74.524444l-39.765333 39.822222 98.986667 98.872889a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-63.886222 63.886222 62.179556 62.122667a34.133333 34.133333 0 0 1-44.088889 51.882667L563.2 387.242667 501.077333 325.063111 437.191111 388.949333l98.986667 98.929778a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-63.886222 63.886222L387.242667 563.2a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.584-62.122667-62.179556-63.886222 63.886222 98.986667 98.929778a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-39.765333 39.822222 197.802667 197.745778 576.284444-576.284444-197.802667-197.745778z" ></path></symbol><symbol id="l7-icon-reposition" viewBox="0 0 1024 1024"><path d="M512 56.888889a34.133333 34.133333 0 0 1 34.133333 34.133333v24.177778A398.336 398.336 0 0 1 908.856889 477.866667h24.177778a34.133333 34.133333 0 0 1 0 68.266666h-24.177778A398.336 398.336 0 0 1 546.133333 908.856889L546.133333 932.977778a34.133333 34.133333 0 0 1-68.266666 0v-24.177778A398.336 398.336 0 0 1 115.2 546.133333L91.022222 546.133333a34.133333 34.133333 0 1 1 0-68.266666h24.177778A398.336 398.336 0 0 1 477.866667 115.2V91.022222A34.133333 34.133333 0 0 1 512 56.888889z m34.190222 126.862222L546.133333 193.422222a34.133333 34.133333 0 1 1-68.266666 0v-9.671111A330.069333 330.069333 0 0 0 183.751111 477.866667h9.671111a34.133333 34.133333 0 1 1 0 68.266666l-9.671111 0.056889A330.069333 330.069333 0 0 0 477.866667 840.248889V830.577778a34.133333 34.133333 0 0 1 68.266666 0l0.056889 9.671111A330.069333 330.069333 0 0 0 840.248889 546.133333L830.577778 546.133333a34.133333 34.133333 0 0 1 0-68.266666h9.671111A330.069333 330.069333 0 0 0 546.133333 183.751111zM512 341.333333a170.666667 170.666667 0 1 1 0 341.333334 170.666667 170.666667 0 0 1 0-341.333334z m0 68.266667a102.4 102.4 0 1 0 0 204.8 102.4 102.4 0 0 0 0-204.8z" ></path></symbol><symbol id="l7-icon-round" viewBox="0 0 1024 1024"><path d="M512 56.888889a455.111111 455.111111 0 0 1 391.395556 687.502222 113.777778 113.777778 0 0 1-159.061334 158.890667A455.111111 455.111111 0 0 1 120.604444 279.608889 113.777778 113.777778 0 0 1 279.608889 120.604444 452.835556 452.835556 0 0 1 512 56.888889z m0 68.266667a384.910222 384.910222 0 0 0-191.715556 50.744888A113.777778 113.777778 0 0 1 175.957333 320.284444a386.844444 386.844444 0 0 0 527.815111 527.758223 113.777778 113.777778 0 0 1 144.270223-144.440889A386.844444 386.844444 0 0 0 512 125.155556z m299.406222 640.739555a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM212.593778 167.082667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-guanbi" viewBox="0 0 1024 1024"><path d="M576 512l277.333333 277.333333-64 64-277.333333-277.333333L234.666667 853.333333 170.666667 789.333333l277.333333-277.333333L170.666667 234.666667 234.666667 170.666667l277.333333 277.333333L789.333333 170.666667 853.333333 234.666667 576 512z" ></path></symbol></svg>', function (t) {
3
3
  try {
4
4
  var a = (a = document.getElementsByTagName('script'))[a.length - 1],
5
- l = a.getAttribute('data-injectcss'),
6
- a = a.getAttribute('data-disable-injectsvg');
7
-
5
+ l = a.getAttribute('data-injectcss'),
6
+ a = a.getAttribute('data-disable-injectsvg');
8
7
  if (!a) {
9
8
  var o,
10
- _e,
11
- i,
12
- n,
13
- m,
14
- c = function c(a, l) {
15
- l.parentNode.insertBefore(a, l);
16
- };
17
-
9
+ _e,
10
+ i,
11
+ n,
12
+ m,
13
+ c = function c(a, l) {
14
+ l.parentNode.insertBefore(a, l);
15
+ };
18
16
  if (l && !t.__iconfont__svg__cssinject__) {
19
17
  t.__iconfont__svg__cssinject__ = !0;
20
-
21
18
  try {
22
19
  document.write('<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>');
23
20
  } catch (a) {
24
21
  console && console.log(a);
25
22
  }
26
23
  }
27
-
28
24
  o = function o() {
29
25
  var a,
30
- l = document.createElement('div');
26
+ l = document.createElement('div');
31
27
  l.innerHTML = t._iconfont_svg_string_3580659, (l = l.getElementsByTagName('svg')[0]) && (l.setAttribute('aria-hidden', 'true'), l.style.position = 'absolute', l.style.width = 0, l.style.height = 0, l.style.overflow = 'hidden', l = l, (a = document.body).firstChild ? c(l, a.firstChild) : a.appendChild(l));
32
28
  }, document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(o, 0) : (_e = function e() {
33
29
  document.removeEventListener('DOMContentLoaded', _e, !1), o();
@@ -35,18 +31,15 @@ window._iconfont_svg_string_3580659 = '<svg><symbol id="l7-icon-area1" viewBox="
35
31
  'complete' == n.readyState && (n.onreadystatechange = null, d());
36
32
  });
37
33
  }
38
-
39
34
  function d() {
40
35
  m || (m = !0, i());
41
36
  }
42
-
43
37
  function L() {
44
38
  try {
45
39
  n.documentElement.doScroll('left');
46
40
  } catch (a) {
47
41
  return void setTimeout(L, 50);
48
42
  }
49
-
50
43
  d();
51
44
  }
52
45
  } catch (e) {}
@@ -6,36 +6,24 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
-
10
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
-
12
10
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
-
14
11
  import { DOM } from '@antv/l7-utils';
15
12
  import Control from "./control";
16
13
  export { ButtonControl };
17
-
18
14
  var ButtonControl = /*#__PURE__*/function (_Control) {
19
15
  _inherits(ButtonControl, _Control);
20
-
21
16
  var _super = _createSuper(ButtonControl);
22
-
23
17
  function ButtonControl() {
24
18
  var _this;
25
-
26
19
  _classCallCheck(this, ButtonControl);
27
-
28
20
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
29
21
  args[_key] = arguments[_key];
30
22
  }
31
-
32
23
  _this = _super.call.apply(_super, [this].concat(args));
33
-
34
24
  _defineProperty(_assertThisInitialized(_this), "isDisable", false);
35
-
36
25
  return _this;
37
26
  }
38
-
39
27
  _createClass(ButtonControl, [{
40
28
  key: "setIsDisable",
41
29
  value:
@@ -45,14 +33,11 @@ var ButtonControl = /*#__PURE__*/function (_Control) {
45
33
  */
46
34
  function setIsDisable(newIsDisable) {
47
35
  this.isDisable = newIsDisable;
48
-
49
36
  if (newIsDisable) {
50
37
  var _this$button;
51
-
52
38
  (_this$button = this.button) === null || _this$button === void 0 ? void 0 : _this$button.setAttribute('disabled', 'true');
53
39
  } else {
54
40
  var _this$button2;
55
-
56
41
  (_this$button2 = this.button) === null || _this$button2 === void 0 ? void 0 : _this$button2.removeAttribute('disabled');
57
42
  }
58
43
  }
@@ -68,9 +53,9 @@ var ButtonControl = /*#__PURE__*/function (_Control) {
68
53
  this.button = this.createButton();
69
54
  this.isDisable = false;
70
55
  var _this$controlOption = this.controlOption,
71
- title = _this$controlOption.title,
72
- btnText = _this$controlOption.btnText,
73
- btnIcon = _this$controlOption.btnIcon;
56
+ title = _this$controlOption.title,
57
+ btnText = _this$controlOption.btnText,
58
+ btnIcon = _this$controlOption.btnIcon;
74
59
  this.setBtnTitle(title);
75
60
  this.setBtnText(btnText);
76
61
  this.setBtnIcon(btnIcon);
@@ -82,100 +67,84 @@ var ButtonControl = /*#__PURE__*/function (_Control) {
82
67
  this.button = this.buttonIcon = this.buttonText = undefined;
83
68
  this.isDisable = false;
84
69
  }
70
+
85
71
  /**
86
72
  * 更新配置方法
87
73
  * @param newOptions
88
74
  */
89
-
90
75
  }, {
91
76
  key: "setOptions",
92
77
  value: function setOptions(newOptions) {
93
78
  var title = newOptions.title,
94
- btnText = newOptions.btnText,
95
- btnIcon = newOptions.btnIcon;
96
-
79
+ btnText = newOptions.btnText,
80
+ btnIcon = newOptions.btnIcon;
97
81
  if (this.checkUpdateOption(newOptions, ['title'])) {
98
82
  this.setBtnTitle(title);
99
83
  }
100
-
101
84
  if (this.checkUpdateOption(newOptions, ['btnIcon'])) {
102
85
  this.setBtnIcon(btnIcon);
103
86
  }
104
-
105
87
  if (this.checkUpdateOption(newOptions, ['btnText'])) {
106
88
  this.setBtnText(btnText);
107
89
  }
108
-
109
90
  _get(_getPrototypeOf(ButtonControl.prototype), "setOptions", this).call(this, newOptions);
110
91
  }
92
+
111
93
  /**
112
94
  * 设置按钮 title
113
95
  * @param title
114
96
  */
115
-
116
97
  }, {
117
98
  key: "setBtnTitle",
118
99
  value: function setBtnTitle(title) {
119
100
  var _this$button3;
120
-
121
101
  (_this$button3 = this.button) === null || _this$button3 === void 0 ? void 0 : _this$button3.setAttribute('title', title !== null && title !== void 0 ? title : '');
122
102
  }
103
+
123
104
  /**
124
105
  * 设置按钮 Icon
125
106
  * @param newIcon
126
107
  */
127
-
128
108
  }, {
129
109
  key: "setBtnIcon",
130
110
  value: function setBtnIcon(newIcon) {
131
111
  if (this.buttonIcon) {
132
112
  DOM.remove(this.buttonIcon);
133
113
  }
134
-
135
114
  if (newIcon) {
136
115
  var _this$button4;
137
-
138
116
  var firstChild = (_this$button4 = this.button) === null || _this$button4 === void 0 ? void 0 : _this$button4.firstChild;
139
-
140
117
  if (firstChild) {
141
118
  var _this$button5;
142
-
143
119
  (_this$button5 = this.button) === null || _this$button5 === void 0 ? void 0 : _this$button5.insertBefore(newIcon, firstChild);
144
120
  } else {
145
121
  var _this$button6;
146
-
147
122
  (_this$button6 = this.button) === null || _this$button6 === void 0 ? void 0 : _this$button6.appendChild(newIcon);
148
123
  }
149
-
150
124
  this.buttonIcon = newIcon;
151
125
  }
152
126
  }
127
+
153
128
  /**
154
129
  * 设置按钮文本
155
130
  * @param newText
156
131
  */
157
-
158
132
  }, {
159
133
  key: "setBtnText",
160
134
  value: function setBtnText(newText) {
161
135
  if (!this.button) {
162
136
  return;
163
137
  }
164
-
165
138
  DOM.removeClass(this.button, 'l7-button-control--row');
166
139
  DOM.removeClass(this.button, 'l7-button-control--column');
167
-
168
140
  if (newText) {
169
141
  var btnText = this.buttonText;
170
-
171
142
  if (!btnText) {
172
143
  var _this$button7;
173
-
174
144
  btnText = DOM.create('div', 'l7-button-control__text');
175
145
  (_this$button7 = this.button) === null || _this$button7 === void 0 ? void 0 : _this$button7.appendChild(btnText);
176
146
  this.buttonText = btnText;
177
147
  }
178
-
179
148
  btnText.innerText = newText;
180
149
  DOM.addClass(this.button, this.controlOption.vertical ? 'l7-button-control--column' : 'l7-button-control--row');
181
150
  } else if (!newText && this.buttonText) {
@@ -184,8 +153,6 @@ var ButtonControl = /*#__PURE__*/function (_Control) {
184
153
  }
185
154
  }
186
155
  }]);
187
-
188
156
  return ButtonControl;
189
157
  }(Control);
190
-
191
158
  export { ButtonControl as default };
@@ -6,80 +6,67 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
-
10
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
-
12
10
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
-
14
11
  import { PositionType, TYPES } from '@antv/l7-core';
15
12
  import { DOM } from '@antv/l7-utils';
16
13
  import EventEmitter from 'eventemitter3';
17
14
  export { PositionType } from '@antv/l7-core';
18
15
  export { Control };
19
-
20
16
  var Control = /*#__PURE__*/function (_ref) {
21
17
  _inherits(Control, _ref);
22
-
23
18
  var _super = _createSuper(Control);
24
-
25
19
  /**
26
20
  * 当前类型控件实例个数
27
21
  * @protected
28
22
  */
23
+
29
24
  function Control(option) {
30
25
  var _this;
31
-
32
26
  _classCallCheck(this, Control);
33
-
34
27
  _this = _super.call(this);
35
28
  Control.controlCount++;
36
29
  _this.controlOption = _objectSpread(_objectSpread({}, _this.getDefault(option)), option || {});
37
30
  return _this;
38
31
  }
39
-
40
32
  _createClass(Control, [{
41
33
  key: "getOptions",
42
34
  value: function getOptions() {
43
35
  return this.controlOption;
44
36
  }
37
+
45
38
  /**
46
39
  * 更新配置的方法,子类如果有自己的配置,也需要重写该方法
47
40
  * @param newOptions
48
41
  */
49
-
50
42
  }, {
51
43
  key: "setOptions",
52
44
  value: function setOptions(newOptions) {
53
45
  var defaultOptions = this.getDefault(newOptions);
54
46
  Object.entries(newOptions).forEach(function (_ref2) {
55
47
  var _ref3 = _slicedToArray(_ref2, 2),
56
- key = _ref3[0],
57
- value = _ref3[1];
58
-
48
+ key = _ref3[0],
49
+ value = _ref3[1];
59
50
  if (value === undefined) {
60
51
  newOptions[key] = defaultOptions[key];
61
52
  }
62
53
  });
63
-
64
54
  if ('position' in newOptions) {
65
55
  this.setPosition(newOptions.position);
66
56
  }
67
-
68
57
  if ('className' in newOptions) {
69
58
  this.setClassName(newOptions.className);
70
59
  }
71
-
72
60
  if ('style' in newOptions) {
73
61
  this.setStyle(newOptions.style);
74
62
  }
75
-
76
63
  this.controlOption = _objectSpread(_objectSpread({}, this.controlOption), newOptions);
77
64
  }
65
+
78
66
  /**
79
67
  * 当 Control 被添加至 Scene 中,被 controlService 调用的方法
80
68
  * @param sceneContainer
81
69
  */
82
-
83
70
  }, {
84
71
  key: "addTo",
85
72
  value: function addTo(sceneContainer) {
@@ -91,63 +78,60 @@ var Control = /*#__PURE__*/function (_ref) {
91
78
  this.configService = sceneContainer.get(TYPES.IGlobalConfigService);
92
79
  this.scene = sceneContainer.get(TYPES.ISceneService);
93
80
  this.sceneContainer = sceneContainer;
94
- this.isShow = true; // 初始化 container
81
+ this.isShow = true;
95
82
 
83
+ // 初始化 container
96
84
  this.container = this.onAdd();
97
85
  DOM.addClass(this.container, 'l7-control');
98
86
  var _this$controlOption = this.controlOption,
99
- className = _this$controlOption.className,
100
- style = _this$controlOption.style;
101
-
87
+ className = _this$controlOption.className,
88
+ style = _this$controlOption.style;
102
89
  if (className) {
103
90
  this.setClassName(className);
104
91
  }
105
-
106
92
  if (style) {
107
93
  this.setStyle(style);
108
- } // 将 container 插入容器中
109
-
110
-
94
+ }
95
+ // 将 container 插入容器中
111
96
  this.insertContainer();
112
97
  this.emit('add', this);
113
98
  return this;
114
99
  }
100
+
115
101
  /**
116
102
  * 将控件移除时触发
117
103
  */
118
-
119
104
  }, {
120
105
  key: "remove",
121
106
  value: function remove() {
122
107
  if (!this.mapsService) {
123
108
  return this;
124
109
  }
125
-
126
110
  DOM.remove(this.container);
127
111
  this.onRemove();
128
112
  this.emit('remove', this);
129
113
  }
114
+
130
115
  /**
131
116
  * Control 被添加的时候被调用,返回 Control 对应的 DOM 容器
132
117
  */
133
-
134
118
  }, {
135
119
  key: "onAdd",
136
120
  value: function onAdd() {
137
121
  return DOM.create('div');
138
122
  }
123
+
139
124
  /**
140
125
  * Control 被移除时调用
141
126
  */
142
127
  // tslint:disable-next-line:no-empty
143
-
144
128
  }, {
145
129
  key: "onRemove",
146
130
  value: function onRemove() {}
131
+
147
132
  /**
148
133
  * 显示控件时触发
149
134
  */
150
-
151
135
  }, {
152
136
  key: "show",
153
137
  value: function show() {
@@ -156,10 +140,10 @@ var Control = /*#__PURE__*/function (_ref) {
156
140
  this.isShow = true;
157
141
  this.emit('show', this);
158
142
  }
143
+
159
144
  /**
160
145
  * 隐藏控件时触发
161
146
  */
162
-
163
147
  }, {
164
148
  key: "hide",
165
149
  value: function hide() {
@@ -168,11 +152,11 @@ var Control = /*#__PURE__*/function (_ref) {
168
152
  this.isShow = false;
169
153
  this.emit('hide', this);
170
154
  }
155
+
171
156
  /**
172
157
  * 获取默认构造器参数
173
158
  */
174
159
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
175
-
176
160
  }, {
177
161
  key: "getDefault",
178
162
  value: function getDefault(option) {
@@ -182,19 +166,19 @@ var Control = /*#__PURE__*/function (_ref) {
182
166
  name: "".concat(Control.controlCount)
183
167
  };
184
168
  }
169
+
185
170
  /**
186
171
  * 获取当前控件对应的 DOM 容器
187
172
  */
188
-
189
173
  }, {
190
174
  key: "getContainer",
191
175
  value: function getContainer() {
192
176
  return this.container;
193
177
  }
178
+
194
179
  /**
195
180
  * 获取当前 Control 是否展示
196
181
  */
197
-
198
182
  }, {
199
183
  key: "getIsShow",
200
184
  value: function getIsShow() {
@@ -206,87 +190,77 @@ var Control = /*#__PURE__*/function (_ref) {
206
190
  // if map exists and event is not a keyboard event
207
191
  if (this.mapsService && e && e.screenX > 0 && e.screenY > 0) {
208
192
  var container = this.mapsService.getContainer();
209
-
210
193
  if (container !== null) {
211
194
  container.focus();
212
195
  }
213
196
  }
214
197
  }
198
+
215
199
  /**
216
200
  * 设置当前控件位置
217
201
  * @param position
218
202
  */
219
-
220
203
  }, {
221
204
  key: "setPosition",
222
205
  value: function setPosition() {
223
206
  var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PositionType.TOPLEFT;
224
207
  // 考虑组件的自动布局,需要销毁重建
225
208
  var controlService = this.controlService;
226
-
227
209
  if (controlService) {
228
210
  controlService.removeControl(this);
229
211
  }
230
-
231
212
  this.controlOption.position = position;
232
-
233
213
  if (controlService) {
234
214
  controlService.addControl(this, this.sceneContainer);
235
215
  }
236
-
237
216
  return this;
238
217
  }
218
+
239
219
  /**
240
220
  * 设置容器 container 的样式相关位置,包含 className
241
221
  * @param className
242
222
  */
243
-
244
223
  }, {
245
224
  key: "setClassName",
246
225
  value: function setClassName(className) {
247
226
  var container = this.container;
248
227
  var oldClassName = this.controlOption.className;
249
-
250
228
  if (oldClassName) {
251
229
  DOM.removeClass(container, oldClassName);
252
230
  }
253
-
254
231
  if (className) {
255
232
  DOM.addClass(container, className);
256
233
  }
257
234
  }
235
+
258
236
  /**
259
237
  * 设置容器 container 的样式相关位置,包含 style
260
238
  * @param style
261
239
  */
262
-
263
240
  }, {
264
241
  key: "setStyle",
265
242
  value: function setStyle(style) {
266
243
  var container = this.container;
267
-
268
244
  if (style) {
269
245
  container.setAttribute('style', style);
270
246
  } else {
271
247
  container.removeAttribute('style');
272
248
  }
273
249
  }
250
+
274
251
  /**
275
252
  * 将控件 DOM 插入到对应 position 的容器中
276
253
  * @protected
277
254
  */
278
-
279
255
  }, {
280
256
  key: "insertContainer",
281
257
  value: function insertContainer() {
282
258
  var position = this.controlOption.position;
283
259
  var container = this.container;
284
-
285
260
  if (position instanceof Element) {
286
261
  position.appendChild(container);
287
262
  } else {
288
263
  var corner = this.controlService.controlCorners[position];
289
-
290
264
  if (position.indexOf('bottom') !== -1) {
291
265
  corner.insertBefore(container, corner.firstChild);
292
266
  } else {
@@ -294,13 +268,13 @@ var Control = /*#__PURE__*/function (_ref) {
294
268
  }
295
269
  }
296
270
  }
271
+
297
272
  /**
298
273
  * 检查当前传入 option 是否包含 keys 字段
299
274
  * @param option
300
275
  * @param keys
301
276
  * @protected
302
277
  */
303
-
304
278
  }, {
305
279
  key: "checkUpdateOption",
306
280
  value: function checkUpdateOption(option, keys) {
@@ -309,10 +283,7 @@ var Control = /*#__PURE__*/function (_ref) {
309
283
  });
310
284
  }
311
285
  }]);
312
-
313
286
  return Control;
314
287
  }(EventEmitter);
315
-
316
288
  _defineProperty(Control, "controlCount", 0);
317
-
318
289
  export { Control as default };