ColorPicker: fix the position of cursor (#12376)

pull/12484/head
why 2018-08-23 17:45:19 +08:00 committed by Jikkai Xiao
parent 4ab7fb4b5d
commit 3d3a2233ee
1 changed files with 1 additions and 3 deletions

View File

@ -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;