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

66 lines
1.1 KiB
JavaScript
Raw Normal View History

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