diff --git a/modules/behavior/drag.js b/modules/behavior/drag.js index 943483873..9735b77ae 100644 --- a/modules/behavior/drag.js +++ b/modules/behavior/drag.js @@ -69,7 +69,6 @@ export function behaviorDrag() { function dragstart() { - console.log('TAH - drag start'); _target = this; _event = eventOf(_target, arguments); @@ -129,7 +128,6 @@ export function behaviorDrag() { function dragend() { - console.log('TAH - drag end'); if (started) { _event({ type: 'end' }); @@ -157,7 +155,6 @@ export function behaviorDrag() { function drag(selection) { - console.log('TAH - drag: ', selection); var matchesSelector = utilPrefixDOMProperty('matchesSelector'); var delegate = dragstart; @@ -168,16 +165,8 @@ export function behaviorDrag() { for (; target && target !== root; target = target.parentNode) { var datum = target.__data__; -<<<<<<< HEAD - var entity; - if (datum instanceof osmNote) { entity = datum;} - else { - entity = datum && datum.properties && datum.properties.entity; - } -======= var entity = datum instanceof osmNote ? datum : datum && datum.properties && datum.properties.entity; ->>>>>>> drag-note if (entity && target[matchesSelector](_selector)) { return dragstart.call(target, entity); diff --git a/modules/modes/drag_note2.js b/modules/modes/drag_note2.js index f2505bb7c..ab0f55cae 100644 --- a/modules/modes/drag_note2.js +++ b/modules/modes/drag_note2.js @@ -136,7 +136,6 @@ export function modeDragNote2(context) { drag.target(vertex.node(), entity); } else { - console.log('else'); context.perform(actionNoop()); } @@ -423,7 +422,6 @@ export function modeDragNote2(context) { mode.enter = function() { - console.log('TAH - mode.drag_note2 entered'); context.install(hover); context.install(edit); @@ -437,7 +435,6 @@ export function modeDragNote2(context) { mode.exit = function() { - console.log('TAH - mode.drag_note2 exited'); context.ui().sidebar.hover.cancel(); context.uninstall(hover); context.uninstall(edit); @@ -466,7 +463,6 @@ export function modeDragNote2(context) { mode.selectedIDs = function() { - console.log('TAH - mode.selectedIDs'); if (!arguments.length) return _activeEntity ? [_activeEntity.id] : []; // no assign return mode; @@ -474,7 +470,6 @@ export function modeDragNote2(context) { mode.activeID = function() { - console.log('TAH - mode.selectedIDs'); if (!arguments.length) return _activeEntity && _activeEntity.id; // no assign return mode; @@ -482,7 +477,6 @@ export function modeDragNote2(context) { mode.restoreSelectedIDs = function(_) { - console.log('TAH - mode.restoreSelectedIDs'); if (!arguments.length) return _restoreSelectedIDs; _restoreSelectedIDs = _; return mode; diff --git a/modules/modes/select_note.js b/modules/modes/select_note.js index 5c4e1d195..3692d4c13 100644 --- a/modules/modes/select_note.js +++ b/modules/modes/select_note.js @@ -8,18 +8,13 @@ import { d3keybinding as d3_keybinding } from '../lib/d3.keybinding.js'; import { behaviorHover, behaviorLasso, - behaviorSelect, - behaviorDrag + behaviorSelect } from '../behavior'; -<<<<<<< HEAD -======= import { modeDragNote } from '../modes'; ->>>>>>> drag-note import { services } from '../services'; import { modeBrowse } from './browse'; -import { modeDragNote } from './drag_note'; import { uiNoteEditor } from '../ui'; @@ -44,11 +39,7 @@ export function modeSelectNote(context, selectedNoteID) { behaviorHover(context), behaviorSelect(context), behaviorLasso(context), -<<<<<<< HEAD - // modeDragNote(context).restoreSelectedNoteIDs(selectedNoteID).behavior TAH - re-add -======= modeDragNote(context).behavior ->>>>>>> drag-note ]; var newFeature = false; diff --git a/modules/services/mapillary.js b/modules/services/mapillary.js index cdf04aa3b..8d87c9c07 100644 --- a/modules/services/mapillary.js +++ b/modules/services/mapillary.js @@ -1,6 +1,4 @@ /* global Mapillary:false */ -import _filter from 'lodash-es/filter'; -import _find from 'lodash-es/find'; import _flatten from 'lodash-es/flatten'; import _forEach from 'lodash-es/forEach'; import _isEmpty from 'lodash-es/isEmpty'; @@ -44,18 +42,6 @@ function abortRequest(i) { } -function nearNullIsland(x, y, z) { - if (z >= 7) { - var center = Math.pow(2, z - 1); - var width = Math.pow(2, z - 6); - var min = center - (width / 2); - var max = center + (width / 2) - 1; - return x >= min && x <= max && y >= min && y <= max; - } - return false; -} - - function maxPageAtZoom(z) { if (z < 15) return 2; if (z === 15) return 5; @@ -66,20 +52,6 @@ function maxPageAtZoom(z) { } -function localeTimestamp(s) { - if (!s) return null; - var detected = utilDetect(); - var options = { - day: 'numeric', month: 'short', year: 'numeric', - hour: 'numeric', minute: 'numeric', second: 'numeric', - timeZone: 'UTC' - }; - var d = new Date(s); - if (isNaN(d.getTime())) return null; - return d.toLocaleString(detected.locale, options); -} - - function loadTiles(which, url, projection) { var s = projection.scale() * 2 * Math.PI; var currZoom = Math.floor(Math.max(Math.log(s) / Math.log(2) - 8, 0)); diff --git a/modules/services/openstreetcam.js b/modules/services/openstreetcam.js index 73483dddc..9895a678b 100644 --- a/modules/services/openstreetcam.js +++ b/modules/services/openstreetcam.js @@ -1,5 +1,3 @@ -import _filter from 'lodash-es/filter'; -import _find from 'lodash-es/find'; import _flatten from 'lodash-es/flatten'; import _forEach from 'lodash-es/forEach'; import _map from 'lodash-es/map'; @@ -53,18 +51,6 @@ function abortRequest(i) { } -function nearNullIsland(x, y, z) { - if (z >= 7) { - var center = Math.pow(2, z - 1), - width = Math.pow(2, z - 6), - min = center - (width / 2), - max = center + (width / 2) - 1; - return x >= min && x <= max && y >= min && y <= max; - } - return false; -} - - function maxPageAtZoom(z) { if (z < 15) return 2; if (z === 15) return 5; diff --git a/modules/services/osm.js b/modules/services/osm.js index 74e9a5cb8..4504e9299 100644 --- a/modules/services/osm.js +++ b/modules/services/osm.js @@ -2,8 +2,6 @@ import _chunk from 'lodash-es/chunk'; import _cloneDeep from 'lodash-es/cloneDeep'; import _extend from 'lodash-es/extend'; import _forEach from 'lodash-es/forEach'; -import _filter from 'lodash-es/filter'; -import _find from 'lodash-es/find'; import _groupBy from 'lodash-es/groupBy'; import _isEmpty from 'lodash-es/isEmpty'; import _map from 'lodash-es/map'; diff --git a/modules/ui/modes.js b/modules/ui/modes.js index ad00af2b4..c1c268fb2 100644 --- a/modules/ui/modes.js +++ b/modules/ui/modes.js @@ -16,7 +16,6 @@ import { import { svgIcon } from '../svg'; import { tooltip } from '../util/tooltip'; import { uiTooltipHtml } from './tooltipHtml'; -import { services } from '../services/index.js'; export function uiModes(context) { diff --git a/modules/ui/note_header.js b/modules/ui/note_header.js index c63b61756..e2bb1af66 100644 --- a/modules/ui/note_header.js +++ b/modules/ui/note_header.js @@ -55,7 +55,7 @@ export function uiNoteHeader() { } - noteHeader.note = function(_, __) { + noteHeader.note = function(_) { if (!arguments.length) return _note; _note = _; return noteHeader;