Fix #2507 num slider arrow pixel offset

This commit is contained in:
JannisX11 2024-10-11 22:27:35 +02:00
parent 68ea0a3fc8
commit bec1558be1
2 changed files with 4 additions and 7 deletions

View File

@ -738,15 +738,12 @@
display: inline-block;
width: 20px;
height: 24px;
margin-top: -28px;
margin-top: -29px;
user-select: none;
margin-left: -42px;
overflow: hidden;
text-align: center;
}
div.nslide_arrow.na_right {
margin-left: 16px;
}
div.nslide.editing {
cursor: text;
}

View File

@ -853,15 +853,15 @@ class NumSlider extends Widget {
'<div class="nslide_arrow na_right"><i class="material-icons">navigate_next</i></div>'
)
var n = limitNumber(scope.node.clientWidth/2-24, 6, 1000)
var n = limitNumber(scope.node.clientWidth/2-22, 6, 1000)
scope.jq_outer.find('.nslide_arrow.na_left').click(function(e) {
scope.arrow(-1, e)
}).css('margin-left', (-n-24)+'px')
}).css('margin-left', (-n-22)+'px')
scope.jq_outer.find('.nslide_arrow.na_right').click(function(e) {
scope.arrow(1, e)
}).css('margin-left', n+'px')
}).css('margin-left', (n)+'px')
})
.on('mouseleave', function() {
scope.jq_outer.find('.nslide_arrow').remove()