[common] fix bug 49591

This commit is contained in:
Maxim Kadushkin 2021-04-12 21:46:28 +03:00
parent e0207d9f31
commit 0a8659a341
2 changed files with 34 additions and 20 deletions

View file

@ -89,12 +89,8 @@ define([
template : _.template([ template : _.template([
'<div class="slider single-slider" style="">', '<div class="slider single-slider" style="">',
'<div class="track">', '<div class="track"></div>',
'<div class="track-left img-commonctrl"></div>', '<div class="thumb" style=""></div>',
'<div class="track-center img-commonctrl"></div>',
'<div class="track-right img-commonctrl" style=""></div>',
'</div>',
'<div class="thumb img-commonctrl" style=""></div>',
'<% if (this.options.enableKeyEvents) { %>', '<% if (this.options.enableKeyEvents) { %>',
'<input type="text" style="position: absolute; top:-10px; width: 1px; height: 1px;">', '<input type="text" style="position: absolute; top:-10px; width: 1px; height: 1px;">',
'<% } %>', '<% } %>',

View file

@ -2,33 +2,51 @@
position: relative; position: relative;
height: 18px; height: 18px;
&.single-slider {
padding-top: 7px;
.track {
@track-height: 4px;
height: @track-height;
border: @track-height / 2 solid @border-regular-control-ie;
border: @track-height / 2 solid @border-regular-control;
border-radius: @track-height / 2;
width: calc(100% + @track-height);
margin-left: -@track-height / 2;
}
.thumb {
@thumb-width: 12px;
width: @thumb-width;
height: @thumb-width;
border: @scaled-one-px-value-ie solid @icon-normal-ie;
border: @scaled-one-px-value solid @icon-normal;
background-color: @background-normal-ie;
background-color: @background-normal;
border-radius: @thumb-width / 2;
top: 3px;
margin-left: @thumb-width / -2;
&.active {
}
}
}
.thumb { .thumb {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0;
width: 13px;
height: 15px;
margin-left: -7px; margin-left: -7px;
cursor: default; cursor: default;
background-position: @slide-thumb-offset-x @slide-thumb-offset-y;
&.active { &.active {
background-position: @slide-thumb-offset-x @slide-thumb-offset-y - 30px;
} }
} }
.track { .track {
height: 18px; height: 18px;
background-color: transparent; background-color: transparent;
.track-left {
background-position: @slide-track-offset-x @slide-track-offset-y;
}
.track-right {
background-position: @slide-track-offset-x - 7px @slide-track-offset-y;
}
.track-center {
background-position: @slide-track-offset-x @slide-track-offset-y - 18px;
}
div { div {
width: 7px; width: 7px;