Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
type: Constants.geojsonTypes.FEATURE,
properties: {
isCircle: true,
center: []
},
geometry: {
type: Constants.geojsonTypes.POLYGON,
coordinates: [[]]
}
});
this.addFeature(polygon);
this.clearSelectedFeatures();
doubleClickZoom.disable(this);
this.updateUIClasses({ mouse: Constants.cursors.ADD });
this.activateUIButton(Constants.types.POLYGON);
this.setActionableState({
trash: true
});
return {
initialRadiusInKm: opts.initialRadiusInKm || DEFAULT_RADIUS_IN_KM,
polygon,
currentVertexPosition: 0
};
};
FreeDraw.onSetup = function() {
const polygon = this.newFeature({
type: Constants.geojsonTypes.FEATURE,
properties: {},
geometry: {
type: Constants.geojsonTypes.POLYGON,
coordinates: [[]]
}
});
this.addFeature(polygon);
this.clearSelectedFeatures();
doubleClickZoom.disable(this);
dragPan.disable(this);
this.updateUIClasses({ mouse: Constants.cursors.ADD });
this.activateUIButton(Constants.types.POLYGON);
this.setActionableState({
trash: true
});
return {
polygon,
currentVertexPosition: 0,
dragMoving: false
};
};