# viewerDragDropMixin

widgets/Source/Viewer/viewerDragDropMixin.js 13
A mixin which adds default drag and drop support for CZML files to the Viewer widget. Rather than being called directly, this function is normally passed as a parameter to `Viewer#extend`, as shown in the example below.

##### Example:

    // Add basic drag and drop support and pop up an alert window on error.
    const viewer = new Cesium.Viewer('cesiumContainer');
    viewer.extend(Cesium.viewerDragDropMixin);
    viewer.dropError.addEventListener(function(viewerArg, source, error) {
        window.alert('Error processing ' + source + ':' + error);
    });

### Members

#### clampToGround : boolean
widgets/Source/Viewer/viewerDragDropMixin.js 185

Gets or sets a value indicating if the datasources should be clamped to the ground

#### clearOnDrop : boolean
widgets/Source/Viewer/viewerDragDropMixin.js 143

Gets or sets a value indicating if existing data sources should be cleared before adding the newly dropped sources.

#### dropEnabled : Element
widgets/Source/Viewer/viewerDragDropMixin.js 111

Gets or sets a value indicating if drag and drop support is enabled.

#### dropError : Event
widgets/Source/Viewer/viewerDragDropMixin.js 132

Gets the event that will be raised when an error is encountered during drop processing.

#### dropTarget : Element
widgets/Source/Viewer/viewerDragDropMixin.js 88

Gets or sets the element to serve as the drop target.

#### flyToOnDrop : boolean
widgets/Source/Viewer/viewerDragDropMixin.js 157

Gets or sets a value indicating if the camera should fly to the data source after it is loaded.

#### proxy : Proxy
widgets/Source/Viewer/viewerDragDropMixin.js 171

Gets or sets the proxy to be used for KML.

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.