Merge branch 'master' of https://github.com/primefaces/primevue
commit
4128992708
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
|
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
|
||||||
[![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue)
|
[![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue)
|
||||||
|
[![Discord Chat](https://img.shields.io/discord/557940238991753223.svg?color=7289da&label=chat&logo=discord)](https://discord.gg/gzKFYnpmCY)
|
||||||
|
|
||||||
[![PrimeVue Hero](https://www.primefaces.org/wp-content/uploads/2020/08/primevue-promo.jpg)](https://www.primefaces.org/primevue)
|
[![PrimeVue Hero](https://www.primefaces.org/wp-content/uploads/2020/08/primevue-promo.jpg)](https://www.primefaces.org/primevue)
|
||||||
|
|
||||||
|
|
|
@ -124,8 +124,8 @@ export default {
|
||||||
let rect = this.colorSelector.getBoundingClientRect();
|
let rect = this.colorSelector.getBoundingClientRect();
|
||||||
let top = rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);
|
let top = rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);
|
||||||
let left = rect.left + document.body.scrollLeft;
|
let left = rect.left + document.body.scrollLeft;
|
||||||
let saturation = Math.floor(100 * (Math.max(0, Math.min(150, (event.pageX - left)))) / 150);
|
let saturation = Math.floor(100 * (Math.max(0, Math.min(150, ((event.pageX || event.changedTouches[0].pageX)- left)))) / 150);
|
||||||
let brightness = Math.floor(100 * (150 - Math.max(0, Math.min(150, (event.pageY - top)))) / 150);
|
let brightness = Math.floor(100 * (150 - Math.max(0, Math.min(150, ((event.pageY || event.changedTouches[0].pageY) - top)))) / 150);
|
||||||
this.hsbValue = this.validateHSB({
|
this.hsbValue = this.validateHSB({
|
||||||
h: this.hsbValue.h,
|
h: this.hsbValue.h,
|
||||||
s: saturation,
|
s: saturation,
|
||||||
|
@ -140,7 +140,7 @@ export default {
|
||||||
pickHue(event) {
|
pickHue(event) {
|
||||||
let top = this.hueView.getBoundingClientRect().top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);
|
let top = this.hueView.getBoundingClientRect().top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);
|
||||||
this.hsbValue = this.validateHSB({
|
this.hsbValue = this.validateHSB({
|
||||||
h: Math.floor(360 * (150 - Math.max(0, Math.min(150, (event.pageY - top)))) / 150),
|
h: Math.floor(360 * (150 - Math.max(0, Math.min(150, ((event.pageY || event.changedTouches[0].pageY) - top)))) / 150),
|
||||||
s: 100,
|
s: 100,
|
||||||
b: 100
|
b: 100
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue