Use constant width for unsquare building degree threshold input (re: #7126)

This commit is contained in:
Quincy Morgan
2019-12-18 12:38:15 -05:00
parent 4592f93c9e
commit 7f76e00bed
2 changed files with 3 additions and 7 deletions

View File

@@ -3253,6 +3253,7 @@ button.autofix.action.active {
input.square-degrees-input {
padding: 2px !important; /* important needed for rtl */
width: 40px;
height: unset;
text-align: center;
background: rgba(0,0,0,0);

View File

@@ -613,9 +613,6 @@ export function uiIssues(context) {
.attr('step', '0.5')
.attr('class', 'square-degrees-input')
.call(utilNoAuto)
.on('input', function() {
this.style.width = (this.value.length + 4.5) + 'ch'; // resize
})
.on('click', function () {
d3_event.preventDefault();
d3_event.stopPropagation();
@@ -629,8 +626,7 @@ export function uiIssues(context) {
})
.on('blur', changeSquare)
.merge(input)
.property('value', degStr)
.style('width', (degStr.length + 2.5) + 'ch'); // resize
.property('value', degStr);
}
@@ -651,8 +647,7 @@ export function uiIssues(context) {
degStr = '' + degNum;
input
.property('value', degStr)
.style('width', (degStr.length + 2.5) + 'ch'); // resize
.property('value', degStr);
context.storage('validate-square-degrees', degStr);
context.validator().changeSquareThreshold(degNum);