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

66 lines
1.1 KiB
JavaScript
Raw Normal View History

2016-06-22 21:58:23 +02:00
import * as ActionTypes from '../../../constants';
export function openPreferences() {
2016-06-24 00:29:55 +02:00
return {
type: ActionTypes.OPEN_PREFERENCES
};
2016-06-22 21:58:23 +02:00
}
export function closePreferences() {
2016-06-24 00:29:55 +02:00
return {
type: ActionTypes.CLOSE_PREFERENCES
};
2016-06-22 21:58:23 +02:00
}
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
export function updateIndentation() {
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
};
}