Limit stroke width to 100 (#796)

This commit is contained in:
DD Liu 2018-12-14 10:46:15 -05:00 committed by GitHub
parent 38ca8b9d3b
commit 1a8178808a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -45,11 +45,11 @@ Edited to add input-range-small
} }
.input-small { .input-small {
width: 3rem; width: 3rem;
text-align: center; text-align: center;
} }
.input-small-range { .input-small-range {
width: 3.75rem; width: 4rem;
text-align: center; text-align: center;
} }

View file

@ -3,7 +3,7 @@ import {CHANGE_SELECTED_ITEMS} from './selected-items';
import {getColorsFromSelection} from '../helper/style-path'; import {getColorsFromSelection} from '../helper/style-path';
const CHANGE_STROKE_WIDTH = 'scratch-paint/stroke-width/CHANGE_STROKE_WIDTH'; 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 initialState = 4;
const reducer = function (state, action) { const reducer = function (state, action) {

View file

@ -13,7 +13,7 @@ test('initialState', () => {
test('changestrokeWidth', () => { test('changestrokeWidth', () => {
let defaultState; let defaultState;
const newstrokeWidth = 234; const newstrokeWidth = 23;
expect(strokeWidthReducer(defaultState /* state */, changeStrokeWidth(newstrokeWidth) /* action */)) expect(strokeWidthReducer(defaultState /* state */, changeStrokeWidth(newstrokeWidth) /* action */))
.toEqual(newstrokeWidth); .toEqual(newstrokeWidth);