Skip to content

Commit

Permalink
Remove references to old modeDrawArea and modeDrawLine classes
Browse files Browse the repository at this point in the history
(closes #711)
  • Loading branch information
bhousel committed Mar 2, 2023
1 parent 715f681 commit 0067dc5
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 104 deletions.
39 changes: 0 additions & 39 deletions modules/modes/draw_area.js

This file was deleted.

43 changes: 0 additions & 43 deletions modules/modes/draw_line.js

This file was deleted.

1 change: 0 additions & 1 deletion modules/modes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export { ModeSave } from './ModeSave';
export { ModeSelect } from './ModeSelect';

export { modeDragNote } from './drag_note';
export { modeDrawArea } from './draw_area';
export { modeMove } from './move';
export { modeRotate } from './rotate';
export { modeSelect } from './select';
10 changes: 1 addition & 9 deletions modules/operations/continue.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { BehaviorKeyOperation } from '../behaviors/BehaviorKeyOperation';


export function operationContinue(context, selectedIDs) {

var _entities = selectedIDs.map(function(id) { return context.graph().entity(id); });
var _geometries = Object.assign(
{ line: [], vertex: [] },
Expand All @@ -27,14 +26,7 @@ export function operationContinue(context, selectedIDs) {


var operation = function() {
var candidate = _candidates[0];

const options = { continueWay: candidate, continueNode: _vertex };
context.enter('draw-line', options);

// context.enter(
// modeDrawLine(context, candidate.id, context.graph(), 'line', candidate.affix(_vertex.id), true)
// );
context.enter('draw-line', { continueWay: _candidates[0], continueNode: _vertex });
};


Expand Down
6 changes: 2 additions & 4 deletions modules/validations/disconnected_way.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Extent } from '@id-sdk/extent';

import { t, localizer } from '../core/localizer';
import { modeDrawLine } from '../modes/draw_line';
import { operationDelete } from '../operations/delete';
import { utilDisplayLabel } from '../util';
import { osmRoutableHighwayTagValues } from '../osm/tags';
import { validationIssue, validationIssueFix } from '../core/validation';
import { services } from '../services';


export function validationDisconnectedWay() {
var type = 'disconnected_way';

Expand Down Expand Up @@ -203,9 +203,7 @@ export function validationDisconnectedWay() {
map.zoomToEase(vertex);
}

context.enter(
modeDrawLine(context, wayId, context.graph(), 'line', way.affix(vertexId), true)
);
context.enter('draw-line', { continueWay: way, continueNode: vertex });
}
});
}
Expand Down
6 changes: 2 additions & 4 deletions modules/validations/impossible_oneway.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Extent } from '@id-sdk/extent';

import { t, localizer } from '../core/localizer';
import { modeDrawLine } from '../modes/draw_line';
import { actionReverse } from '../actions/reverse';
import { utilDisplayLabel } from '../util';
import { osmFlowingWaterwayTagValues, osmOneWayTags, osmRoutableHighwayTagValues } from '../osm/tags';
import { validationIssue, validationIssueFix } from '../core/validation';
import { services } from '../services';


export function validationImpossibleOneway() {
var type = 'impossible_oneway';

Expand Down Expand Up @@ -227,9 +227,7 @@ export function validationImpossibleOneway() {
map.zoomToEase(vertex);
}

context.enter(
modeDrawLine(context, way.id, context.graph(), 'line', way.affix(vertex.id), true)
);
context.enter('draw-line', { continueWay: way, continueNode: vertex });
}

validation.type = type;
Expand Down
5 changes: 1 addition & 4 deletions modules/validations/short_road.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Extent } from '@id-sdk/extent';

import { geoSphericalDistance } from '@id-sdk/geo';
import { modeDrawLine } from '../modes';
import { operationDelete } from '../operations/index';
import { t } from '../core/localizer';
import { utilDisplayLabel } from '../util';
Expand Down Expand Up @@ -37,9 +36,7 @@ export function validationShortRoad(context) {
map.zoomToEase(vertex);
}

context.enter(
modeDrawLine(context, way.id, context.graph(), context.graph(), '', way.affix(vertex.id), true)
);
context.enter('draw-line', { continueWay: way, continueNode: vertex });
}


Expand Down

0 comments on commit 0067dc5

Please sign in to comment.