Refactoring

This commit is contained in:
OVSharova 2021-09-23 13:19:07 +03:00
parent 86be010e64
commit b339afaf68
2 changed files with 8 additions and 17 deletions

View file

@ -55,7 +55,6 @@ define([
'<% } %>'+ '<% } %>'+
'<div>'+ '<div>'+
'<div class="cnt-hb img-colorpicker">'+ '<div class="cnt-hb img-colorpicker">'+
//'<div class="cnt-hb-arrow img-colorpicker"></div>'+
'<div class="cnt-hb-arrow"></div>'+ '<div class="cnt-hb-arrow"></div>'+
'</div>'+ '</div>'+
'<% if (this.changeSaturation) { %>'+ '<% if (this.changeSaturation) { %>'+
@ -127,10 +126,8 @@ define([
previewColorText[0].innerHTML = (me.color == 'transparent') ? me.textNoColor : me.color.toUpperCase(); previewColorText[0].innerHTML = (me.color == 'transparent') ? me.textNoColor : me.color.toUpperCase();
if (arrowSatBrightness.length>0 && arrowHue.length>0) { if (arrowSatBrightness.length>0 && arrowHue.length>0) {
arrowSatBrightness.css('left', saturationVal + '%'); arrowSatBrightness.css('left', saturationVal + '%').css('top', 100 - brightnessVal + '%').css({'background-color' : me.color});
arrowSatBrightness.css('top', 100 - brightnessVal + '%');
arrowHue.css('top', parseInt(hueVal * 100 / 360.0) + '%'); arrowHue.css('top', parseInt(hueVal * 100 / 360.0) + '%');
arrowSatBrightness.css({'background-color' : me.color});
} }
}; };

View file

@ -32,8 +32,7 @@
.cnt-hb { .cnt-hb {
display: inline-block; display: inline-block;
//overflow: hidden; width: 195px;
width: 196px;
height: 196px; height: 196px;
position: relative; position: relative;
background-position: 0 0; background-position: 0 0;
@ -50,13 +49,11 @@
width: 12px; width: 12px;
height: 100%; height: 100%;
position: relative; position: relative;
background-position: -196px 0; border: @scaled-one-px-value-ie solid @border-regular-control-ie;
} border: @scaled-one-px-value solid @border-regular-control;
.radius(@parametr){ background-position: -195px 0;
border-radius: @parametr;
-moz-border-radius: @parametr;
-webkit-border-radius: @parametr;
} }
.cnt-hb-arrow { .cnt-hb-arrow {
display: block; display: block;
width: 12px; width: 12px;
@ -65,7 +62,7 @@
position: absolute; position: absolute;
border: @scaled-one-px-value-ie solid #000; border: @scaled-one-px-value-ie solid #000;
border: @scaled-one-px-value solid #000; border: @scaled-one-px-value solid #000;
.radius(50%); .border-radius(50%);
&:after{ &:after{
content: ' '; content: ' ';
position: absolute; position: absolute;
@ -73,11 +70,8 @@
height: 100%; height: 100%;
border: @scaled-one-px-value-ie solid #fff; border: @scaled-one-px-value-ie solid #fff;
border: @scaled-one-px-value solid #fff; border: @scaled-one-px-value solid #fff;
.radius(50%); .border-radius(50%);
} }
// background-position: 0 -196px;
} }
.cnt-sat-arrow { .cnt-sat-arrow {