From ac7a91311a64dfc239e953a8c7429d6f0ddc570f Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Sat, 14 Dec 2019 20:42:01 -0500 Subject: [PATCH] Fix merge conflict... with fire. --- meeting_guide/static/meeting_guide/app.js | 58 ++--------------------- 1 file changed, 4 insertions(+), 54 deletions(-) diff --git a/meeting_guide/static/meeting_guide/app.js b/meeting_guide/static/meeting_guide/app.js index 0587aea..e397562 100644 --- a/meeting_guide/static/meeting_guide/app.js +++ b/meeting_guide/static/meeting_guide/app.js @@ -435,12 +435,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _possibleConstructorReturn; }); -/* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); +/* harmony import */ var _helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); function _possibleConstructorReturn(self, call) { - if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) { + if (call && (Object(_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) { return call; } @@ -49533,49 +49533,6 @@ function (_React$Component) { } _createClass(App, [{ -<<<<<<< HEAD -======= - key: "distance", - value: function distance(lat1, lon1, lat2, lon2) { - // Calculate the distance as the crow flies between two geometric points - // Adapted from: https://www.geodatasource.com/developers/javascript - if (lat1 == lat2 && lon1 == lon2) { - return 0; - } else { - var radlat1 = Math.PI * lat1 / 180; - var radlat2 = Math.PI * lat2 / 180; - var radtheta = Math.PI * (lon1 - lon2) / 180; - var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta); - - if (dist > 1) { - dist = 1; - } - - dist = Math.acos(dist); - dist = dist * 12436.2 / Math.PI; // 12436.2 = 180 * 60 * 1.1515 - - return dist; - } - } - }, { - key: "setUserLatLng", - value: function setUserLatLng(position) { - // Callback function invoked when user allows latitude/longitude to be probed - this.setState({ - user_latitude: position.coords.latitude, - user_longitude: position.coords.longitude, - geolocation: true - }); - - for (var index = 0; index < this.state.meetings.length; index++) { - this.state.meetings[index].distance = this.distance(this.state.user_latitude, this.state.user_longitude, this.state.meetings[index].latitude, this.state.meetings[index].longitude).toFixed(2).toString() + " mi"; - } - - _settings__WEBPACK_IMPORTED_MODULE_11__["settings"].defaults.columns.push("distance"); - console.log(_settings__WEBPACK_IMPORTED_MODULE_11__["settings"].defaults.columns); - } - }, { ->>>>>>> e67bd9e915d180d4ca403deac887525f78c22c77 key: "componentDidMount", value: function componentDidMount() { var _this2 = this; @@ -49615,12 +49572,6 @@ function (_React$Component) { error: json ? 'bad_data' : 'no_data', loading: false }); - }).then(function (result) { - // Find the end user's location, if given permission. Load after JSON to ensure - // that we can update distances. - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(_this2.setUserLatLng.bind(_this2)); - } }); } //function for components to set global state @@ -50728,7 +50679,6 @@ function (_Component) { value: function render() { var _this = this; - console.log(_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaults.columns); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "row" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("table", { @@ -51740,8 +51690,8 @@ var strings = settings.strings[settings.language]; /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! C:\Users\tallen\Desktop\react\src\app.jsx */"./src/app.jsx"); -module.exports = __webpack_require__(/*! C:\Users\tallen\Desktop\react\src\style.scss */"./src/style.scss"); +__webpack_require__(/*! /Users/tallen/projects/react-meeting-guide/src/app.jsx */"./src/app.jsx"); +module.exports = __webpack_require__(/*! /Users/tallen/projects/react-meeting-guide/src/style.scss */"./src/style.scss"); /***/ })