p5.js-web-editor/client/modules/IDE/actions/preferences.js

54 lines
915 B
JavaScript
Raw Normal View History

2016-06-22 21:58:23 +02:00
import * as ActionTypes from '../../../constants';
export function increaseFont() {
2016-06-24 00:29:55 +02:00
return {
type: ActionTypes.INCREASE_FONTSIZE
};
2016-06-22 21:58:23 +02:00
}
export function decreaseFont() {
2016-06-24 00:29:55 +02:00
return {
type: ActionTypes.DECREASE_FONTSIZE
};
}
2016-07-06 17:27:39 +02:00
2016-07-11 02:13:37 +02:00
export function updateFont(event) {
const value = event.target.value;
return {
type: ActionTypes.UPDATE_FONTSIZE,
value
};
}
2016-07-06 17:27:39 +02:00
export function increaseIndentation() {
return {
type: ActionTypes.INCREASE_INDENTATION
};
}
export function decreaseIndentation() {
return {
type: ActionTypes.DECREASE_INDENTATION
};
}
2016-07-11 02:13:37 +02:00
2016-07-13 18:59:58 +02:00
export function updateIndentation(event) {
2016-07-11 02:13:37 +02:00
const value = event.target.value;
return {
type: ActionTypes.UPDATE_INDENTATION,
value
};
}
2016-07-11 04:52:48 +02:00
export function indentWithTab() {
return {
type: ActionTypes.INDENT_WITH_TAB
};
}
export function indentWithSpace() {
return {
type: ActionTypes.INDENT_WITH_SPACE
};
}