1
guanqb
2024-01-20 f13afcb61276061871b30bce17a7877287df0b67
src/utils/plot/Plot.js
@@ -11,6 +11,7 @@
import EditBillboard from './edit/EditBillboard'
class Plot {
    constructor(viewer, options = {}) {
        this._currentWorker = undefined
        this._viewer = viewer
        this._options = options
        this._layer = new global.DC.Namespace.Cesium.CustomDataSource('cur-plot-layer')
@@ -51,6 +52,9 @@
            default:
                break
        }
        this._currentWorker = drawWorker
        return drawWorker
    }
@@ -74,6 +78,9 @@
            default:
                break
        }
        this._currentWorker = editWorker
        return editWorker
    }
@@ -115,6 +122,14 @@
        return this
    }
    stop (overlay) {
        if (this._state == 'draw') {
            this._currentWorker?._onDrawStop()
        } else {
            this._currentWorker?._onEditStop(overlay)
        }
    }
    /**
   *
   * @returns {Plot}