mirror of https://github.com/ElemeFE/element
ColorPicker: fix the position of cursor (#12376)
parent
4ab7fb4b5d
commit
3d3a2233ee
|
@ -47,9 +47,7 @@
|
|||
const value = this.color.get('value');
|
||||
|
||||
const el = this.$el;
|
||||
let { width, height } = el.getBoundingClientRect();
|
||||
|
||||
if (!height) height = width * 3 / 4;
|
||||
let { clientWidth: width, clientHeight: height } = el;
|
||||
|
||||
this.cursorLeft = saturation * width / 100;
|
||||
this.cursorTop = (100 - value) * height / 100;
|
||||
|
|
Loading…
Reference in New Issue