Commit 3d3a2233 authored by why's avatar why Committed by Jikkai Xiao

ColorPicker: fix the position of cursor (#12376)

parent 4ab7fb4b
...@@ -47,9 +47,7 @@ ...@@ -47,9 +47,7 @@
const value = this.color.get('value'); const value = this.color.get('value');
const el = this.$el; const el = this.$el;
let { width, height } = el.getBoundingClientRect(); let { clientWidth: width, clientHeight: height } = el;
if (!height) height = width * 3 / 4;
this.cursorLeft = saturation * width / 100; this.cursorLeft = saturation * width / 100;
this.cursorTop = (100 - value) * height / 100; this.cursorTop = (100 - value) * height / 100;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment