From 8631f9f52632f39bf9e44b8f1e592a4b4fbbfb22 Mon Sep 17 00:00:00 2001 From: Lorenzo Natali Date: Fri, 28 Oct 2016 16:09:39 +0200 Subject: [PATCH] render the color picker in a different place to avoid scroll --- .../style/ColorMapGridComponents/ColorPickerRenderer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/components/style/ColorMapGridComponents/ColorPickerRenderer.jsx b/web/client/components/style/ColorMapGridComponents/ColorPickerRenderer.jsx index 4542ae9e89..e36af3a62a 100644 --- a/web/client/components/style/ColorMapGridComponents/ColorPickerRenderer.jsx +++ b/web/client/components/style/ColorMapGridComponents/ColorPickerRenderer.jsx @@ -75,7 +75,7 @@ const ColorPickerRenderer = React.createClass({ }, calculateTop(y) { let h = getWindowSize().maxHeight; - return (y + 300 > h) ? h - 305 : y; + return ((y + 300 > h) ? h - 305 : y ) - 300; }, hexToRgb(hex) { const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);