From b78b99b3a9be1b86c0a0f868b1b254d539dab4d8 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Sun, 29 Oct 2017 14:51:25 -0400 Subject: [PATCH] Make color sliders go from 0 to 100 --- src/components/forms/slider.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/forms/slider.jsx b/src/components/forms/slider.jsx index d49ba27c..f9e455e5 100644 --- a/src/components/forms/slider.jsx +++ b/src/components/forms/slider.jsx @@ -32,7 +32,7 @@ class SliderComponent extends React.Component { event.preventDefault(); const backgroundBBox = this.background.getBoundingClientRect(); const x = event.clientX - backgroundBBox.left; - this.props.onChange(Math.max(1, Math.min(99, 100 * x / backgroundBBox.width))); + this.props.onChange(Math.max(0, Math.min(100, 100 * x / backgroundBBox.width))); } setBackground (ref) {