mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
drop unneeded duplicate test; lint code
This commit is contained in:
@@ -28,7 +28,7 @@ export function svgDefs(context) {
|
||||
// positioning for different tags)
|
||||
|
||||
/** @param {string} name @param {string} colour */
|
||||
function addOnewayMarker(name, colour, opacity) {
|
||||
function addOnewayMarker(name, colour) {
|
||||
_defsSelection
|
||||
.append('marker')
|
||||
.attr('id', `ideditor-oneway-marker-${name}`)
|
||||
|
||||
@@ -239,7 +239,7 @@ export function dmsMatcher(q, _localeCode = undefined) {
|
||||
parser: localizedNumberCoordsParser
|
||||
}
|
||||
];
|
||||
function localizedNumberCoordsParser(q, ) {
|
||||
function localizedNumberCoordsParser(q) {
|
||||
const parseLocaleFloat = localizer.floatParser(_localeCode || localizer.localeCode());
|
||||
let parts = q.split(/,?\s+|\s*[\/\\]\s*/);
|
||||
if (parts.length !== 2) return false;
|
||||
|
||||
@@ -32,12 +32,6 @@ describe('iD.units', function() {
|
||||
expect(result[0]).to.be.closeTo(-1.23, 0.00001);
|
||||
expect(result[1]).to.be.closeTo(34.44, 0.00001);
|
||||
});
|
||||
it('parses z/x/y coordinate', () => {
|
||||
var result = iD.dmsMatcher('2/-1.23/34.44');
|
||||
expect(result[0]).to.be.closeTo(-1.23, 0.00001);
|
||||
expect(result[1]).to.be.closeTo(34.44, 0.00001);
|
||||
expect(result[2]).to.eql(2);
|
||||
});
|
||||
it('parses coordinate with localized numbers', () => {
|
||||
var result = iD.dmsMatcher('49,4109399, 8,7147086', 'de');
|
||||
expect(result[0]).to.be.closeTo(49.4109399, 0.00001);
|
||||
|
||||
Reference in New Issue
Block a user