mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
lint
This commit is contained in:
@@ -453,9 +453,7 @@ export function uiFieldCombo(field, context) {
|
||||
|
||||
if (_isSemi) {
|
||||
_inputWrap.call(_lengthIndicator);
|
||||
} else if (_isMulti) {
|
||||
// todo: implement
|
||||
} else {
|
||||
} else if (!_isMulti) {
|
||||
_container.call(_lengthIndicator);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@ export function uiLengthIndicator(maxChars) {
|
||||
lengthIndicator.update = function(val) {
|
||||
const strLen = utilUnicodeCharsCount(utilCleanOsmString(val, Number.POSITIVE_INFINITY));
|
||||
|
||||
var lengthIndicator = _wrap.selectAll('span.length-indicator')
|
||||
let indicator = _wrap.selectAll('span.length-indicator')
|
||||
.data([strLen]);
|
||||
|
||||
lengthIndicator = lengthIndicator.enter()
|
||||
indicator.enter()
|
||||
.append('span')
|
||||
.merge(lengthIndicator)
|
||||
.merge(indicator)
|
||||
.classed('length-indicator', true)
|
||||
.classed('limit-reached', d => d > maxChars)
|
||||
.style('border-right-width', d => `${Math.abs(maxChars - d) * 2}px`)
|
||||
@@ -52,7 +52,7 @@ export function uiLengthIndicator(maxChars) {
|
||||
} else {
|
||||
_tooltip.hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return lengthIndicator;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user