From 1a8178808ae087e7a55c86a3666326da798e385f Mon Sep 17 00:00:00 2001 From: DD Liu Date: Fri, 14 Dec 2018 10:46:15 -0500 Subject: [PATCH] Limit stroke width to 100 (#796) --- src/components/forms/input.css | 4 ++-- src/reducers/stroke-width.js | 2 +- test/unit/stroke-width-reducer.test.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/forms/input.css b/src/components/forms/input.css index cfbb685d..ca9d406a 100644 --- a/src/components/forms/input.css +++ b/src/components/forms/input.css @@ -45,11 +45,11 @@ Edited to add input-range-small } .input-small { - width: 3rem; + width: 3rem; text-align: center; } .input-small-range { - width: 3.75rem; + width: 4rem; text-align: center; } diff --git a/src/reducers/stroke-width.js b/src/reducers/stroke-width.js index 6d504748..5ff0e634 100644 --- a/src/reducers/stroke-width.js +++ b/src/reducers/stroke-width.js @@ -3,7 +3,7 @@ import {CHANGE_SELECTED_ITEMS} from './selected-items'; import {getColorsFromSelection} from '../helper/style-path'; const CHANGE_STROKE_WIDTH = 'scratch-paint/stroke-width/CHANGE_STROKE_WIDTH'; -const MAX_STROKE_WIDTH = 800; +const MAX_STROKE_WIDTH = 100; const initialState = 4; const reducer = function (state, action) { diff --git a/test/unit/stroke-width-reducer.test.js b/test/unit/stroke-width-reducer.test.js index f4ad3061..3218a4bf 100644 --- a/test/unit/stroke-width-reducer.test.js +++ b/test/unit/stroke-width-reducer.test.js @@ -13,7 +13,7 @@ test('initialState', () => { test('changestrokeWidth', () => { let defaultState; - const newstrokeWidth = 234; + const newstrokeWidth = 23; expect(strokeWidthReducer(defaultState /* state */, changeStrokeWidth(newstrokeWidth) /* action */)) .toEqual(newstrokeWidth);