You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

36 lines
727 B

export const TROGGLE_ACTION = 'TROGGLE_ACTION';
export const CREATE = 'CREATE';
export const MOVE = 'MOVE';
export const FREEZE_ALL = 'FREEZE_ALL';
export const UNFREEZE_ALL = 'UNFREEZE_ALL';
export const CLEAR_ALL = 'CLEAR_ALL';
export const create = (x, y) => ({
type: TROGGLE_ACTION,
action: CREATE,
x: x,
y: y
});
export const move = (index, x, y) => ({
type: TROGGLE_ACTION,
action: MOVE,
index: index,
x: x,
y: y
});
export const freezeAll = () => ({
type: TROGGLE_ACTION,
action: FREEZE_ALL
});
export const unfreezeAll = () => ({
type: TROGGLE_ACTION,
action: UNFREEZE_ALL
});
export const clearAll = () => ({
type: TROGGLE_ACTION,
action: CLEAR_ALL
});