You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @Author: Caven
  3. * @Date: 2020-08-30 23:46:07
  4. */
  5. import { Cesium } from '@dc-modules/namespace'
  6. import { PlotEventType } from '@dc-modules/event'
  7. import { Transform } from '@dc-modules/transform'
  8. import Edit from './Edit'
  9. import FineArrowGraphics from '../graphics/FineArrowGraphics'
  10. class EditFineArrow extends Edit {
  11. constructor(overlay) {
  12. super(overlay)
  13. this._graphics = new FineArrowGraphics()
  14. }
  15. /**
  16. *
  17. * @private
  18. */
  19. _mountedHook() {
  20. this._delegate.polygon.hierarchy = new Cesium.CallbackProperty(() => {
  21. if (this._positions.length > 1) {
  22. this._graphics.positions = this._positions
  23. return this._graphics.hierarchy
  24. } else {
  25. return null
  26. }
  27. }, false)
  28. this._layer.entities.add(this._delegate)
  29. }
  30. }
  31. export default EditFineArrow