mirror of
https://gitee.com/layui/layui.git
synced 2025-04-28 16:38:02 +08:00
优化 colorpicker 点击颜色滑块时跳动到顶部的问题
This commit is contained in:
parent
429e49d0ae
commit
393745f2e5
@ -470,9 +470,9 @@ layui.define(['jquery', 'lay'], function(exports){
|
|||||||
});
|
});
|
||||||
|
|
||||||
side.on('click', function(e){
|
side.on('click', function(e){
|
||||||
var top = e.clientY - $(this).offset().top;
|
var top = e.clientY - $(this).offset().top + $win.scrollTop();
|
||||||
if(top < 0)top = 0;
|
if(top < 0)top = 0;
|
||||||
if(top > this.offsetHeight)top = this.offsetHeight;
|
if(top > this.offsetHeight) top = this.offsetHeight;
|
||||||
var h = top/180*360;
|
var h = top/180*360;
|
||||||
_h = h;
|
_h = h;
|
||||||
change(h, _s, _b, _a);
|
change(h, _s, _b, _a);
|
||||||
|
Loading…
Reference in New Issue
Block a user