Skip to content

Commit

Permalink
color-picker: 一些情况下取色光标定位不准问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
cnwhy committed Aug 23, 2018
1 parent ea45d54 commit 0538ea7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/color-picker/src/components/sv-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0538ea7

Please sign in to comment.