Doodle palette, options, fill tool (#172)

This commit is contained in:
Ondřej Hruška
2017-10-14 00:58:38 +02:00
committed by GitHub
parent daa04c39b6
commit 531dadad86
7 changed files with 430 additions and 48 deletions

View File

@@ -26,6 +26,7 @@ import {
COMPOSE_UPLOAD_CHANGE_REQUEST,
COMPOSE_UPLOAD_CHANGE_SUCCESS,
COMPOSE_UPLOAD_CHANGE_FAIL,
COMPOSE_DOODLE_SET,
COMPOSE_RESET,
} from '../actions/compose';
import { TIMELINE_DELETE } from '../actions/timelines';
@@ -61,6 +62,15 @@ const initialState = ImmutableMap({
default_sensitive: false,
resetFileKey: Math.floor((Math.random() * 0x10000)),
idempotencyKey: null,
doodle: ImmutableMap({
fg: 'rgb( 0, 0, 0)',
bg: 'rgb(255, 255, 255)',
mode: 'draw',
weight: 2,
opacity: 1,
adaptiveStroke: true,
smoothing: false,
}),
});
function statusToTextMentions(state, status) {
@@ -288,6 +298,8 @@ export default function compose(state = initialState, action) {
return item;
}));
case COMPOSE_DOODLE_SET:
return state.mergeIn(['doodle'], action.options);
default:
return state;
}