From 668b41bb91361cd31d02f81ce8a93877edaddbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taneli=20Riihim=C3=A4ki?= <m3034@student.jamk.fi> Date: Fri, 28 Jun 2019 09:01:37 +0300 Subject: [PATCH] Fix merges (hopefully) --- src/components/DrawTools.js | 42 ------------------------------------- 1 file changed, 42 deletions(-) diff --git a/src/components/DrawTools.js b/src/components/DrawTools.js index 2f36baf..00ee52a 100644 --- a/src/components/DrawTools.js +++ b/src/components/DrawTools.js @@ -1,8 +1,5 @@ import React, { Component } from "react"; import { EditControl } from "react-leaflet-draw"; -<<<<<<< src/components/DrawTools.js -import { FeatureGroup } from "react-leaflet"; -======= import L from "leaflet"; import "leaflet-draw"; import { FeatureGroup } from "react-leaflet"; @@ -63,7 +60,6 @@ L.DrawToolbar.include({ ]; } }); ->>>>>>> src/components/DrawTools.js class DrawTools extends Component { constructor(props) { @@ -74,20 +70,6 @@ class DrawTools extends Component { } _onCreated = e => { -<<<<<<< src/components/DrawTools.js - let type = e.layerType; // from the example; isn't used right now, but may be relevant in the future - let layer = e.layer; - this.makeGeoJSON(e.layer); - }; - - // turn layer to GeoJSON data and add it to an array of all GeoJSON data of the current map - makeGeoJSON = e => { - let geoJSON = e.toGeoJSON(); - let newGeoJSONAll = this.state.geoJSONAll; - newGeoJSONAll.push(geoJSON); - this.setState({ geoJSONAll: newGeoJSONAll }); - console.log(JSON.stringify(geoJSON, null, 4)); // printing GeoJSON data of the previous object create -======= // check if a drawn polyline has just one point in it if (e.layerType === "polyline" && e.layer.getLatLngs().length === 1) { e.layer.remove(); @@ -143,7 +125,6 @@ class DrawTools extends Component { newGeoJSONAll.push(geoJSON); // can't do +=, need to use push function console.log(JSON.stringify(newGeoJSONAll, null, 4)); this.setState({ geoJSONAll: newGeoJSONAll }); ->>>>>>> src/components/DrawTools.js }; render() { @@ -155,16 +136,6 @@ class DrawTools extends Component { onCreated={this._onCreated} draw={{ circle: { -<<<<<<< src/components/DrawTools.js - repeatMode: false, // allows using the tool again after finishing the previous shape. turned off here - shapeOptions: { - color: "#f9f10c", - opacity: 100 - } - }, - rectangle: { - repeatMode: false -======= repeatMode: true, // allows using the tool again after finishing the previous shape shapeOptions: { color: "#f9f10c", @@ -173,7 +144,6 @@ class DrawTools extends Component { }, rectangle: { repeatMode: true ->>>>>>> src/components/DrawTools.js }, polygon: { repeatMode: true, @@ -184,30 +154,18 @@ class DrawTools extends Component { }, shapeOptions: { color: "#ed2572", -<<<<<<< src/components/DrawTools.js - opacity: 100 -======= opacity: 1 ->>>>>>> src/components/DrawTools.js } }, polyline: { repeatMode: true, shapeOptions: { color: "#ed2572", -<<<<<<< src/components/DrawTools.js - opacity: 100 - } - }, - marker: { - repeatMode: true -======= opacity: 1 } }, marker: { repeatMode: false ->>>>>>> src/components/DrawTools.js }, circlemarker: false }} -- GitLab