Skip to content
Snippets Groups Projects

Resolve MIN-90 "Feat/ adding layerimage"

Merged Miłosz Grocholewski requested to merge feat/MIN-90-adding-layerimage into development
1 file
+ 10
1
Compare changes
  • Side-by-side
  • Inline
@@ -17,7 +17,16 @@ export default function getDrawImageInteraction(
): Draw {
const drawImageInteraction = new Draw({
type: 'Circle',
freehand: true,
freehand: false,
freehandCondition: (mapBrowserEvent): boolean => {
const coords = mapBrowserEvent.coordinate;
return (
coords[0] >= restrictionExtent[0] &&
coords[0] <= restrictionExtent[2] &&
coords[1] >= restrictionExtent[1] &&
coords[1] <= restrictionExtent[3]
);
},
geometryFunction: (coordinates, geometry): SimpleGeometry => {
const newGeometry = geometry || new Polygon([]);
if (!Array.isArray(coordinates) || coordinates.length < 2) {
Loading