Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { BehaviorSubject, Subscription } from 'rxjs';
import OlGeometryType from 'ol/geom/GeometryType';
import { Style as OlStyle } from 'ol/style';
import { FormFieldComponent } from '@igo2/common';
import { IgoMap } from '../../map';
import { GeoJSONGeometry } from '../shared/geometry.interfaces';
/**
* This input allows a user to draw a new geometry or to edit
* an existing one on a map.
*/
@FormFieldComponent('geometry')
@Component({
selector: 'igo-geometry-form-field',
templateUrl: './geometry-form-field.component.html',
styleUrls: ['./geometry-form-field.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class GeometryFormFieldComponent implements OnInit, OnDestroy {
readonly value$: BehaviorSubject = new BehaviorSubject(undefined);
private value$$: Subscription;
public drawControlIsActive = true;
public freehandDrawIsActive = false;
/**