diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-09-29 18:56:17 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-09-29 18:56:17 -0400 |
| commit | dea374c2a0721a394ae5f041e8e324df4b5eb375 (patch) | |
| tree | 5af4cc85c7df25c34202c391ce7d9572ea1e87ff | |
| parent | 19ddbd17cab15343e04e94e1a2c15088aac1d4d9 (diff) | |
fix color picker cursor lol
| -rw-r--r-- | public/assets/javascripts/ui/editor/LightControl.js | 4 | ||||
| -rwxr-xr-x | public/assets/stylesheets/app.css | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/public/assets/javascripts/ui/editor/LightControl.js b/public/assets/javascripts/ui/editor/LightControl.js index 9c3cdd3..3eb2861 100644 --- a/public/assets/javascripts/ui/editor/LightControl.js +++ b/public/assets/javascripts/ui/editor/LightControl.js @@ -175,10 +175,12 @@ var LabColorPicker = function (parent, w, h) { return rgb } this.pick = function(i, j){ + i = clamp(i, 0, w) + j = clamp(j, 0, h) var x = mix( i/ww, a_range[0], a_range[1] ) var y = mix( j/hh, b_range[0], b_range[1] ) var rgb = xyz2rgb(hunterlab2xyz(val, x, y)).map(Math.round) - this.moveCursor(x,y) + this.moveCursor(i, j) parent.pick( rgb, [val,x,y] ) } this.load = function(rgba){ diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index e136e03..39f9f1a 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -1274,6 +1274,7 @@ input[type="range"]::-webkit-slider-thumb { border: 2px solid black; border-radius: 50%; margin-left: -4px; + margin-top: -4px; } .swatch { |
