2013-06-17 13:42:53 +04:00
|
|
|
// TODO(grosbouddha): put under pskl namespace.
|
2013-09-28 23:10:12 +04:00
|
|
|
var Events = {
|
2013-09-29 02:01:18 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
TOOL_SELECTED : "TOOL_SELECTED",
|
|
|
|
TOOL_RELEASED : "TOOL_RELEASED",
|
2013-11-19 10:40:35 +04:00
|
|
|
SELECT_PRIMARY_COLOR: "SELECT_PRIMARY_COLOR",
|
|
|
|
SELECT_SECONDARY_COLOR: "SELECT_SECONDARY_COLOR",
|
2012-09-03 03:24:55 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
/**
|
|
|
|
* When this event is emitted, a request is sent to the localstorage
|
2013-09-29 02:01:18 +04:00
|
|
|
* Service to save the current framesheet. The storage service
|
2013-08-10 14:11:16 +04:00
|
|
|
* may not immediately store data (internal throttling of requests).
|
|
|
|
*/
|
|
|
|
LOCALSTORAGE_REQUEST: "LOCALSTORAGE_REQUEST",
|
2012-09-03 03:24:55 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
/**
|
|
|
|
* Fired each time a user setting change.
|
|
|
|
* The payload will be:
|
|
|
|
* 1st argument: Name of the settings
|
|
|
|
* 2nd argument: New value
|
|
|
|
*/
|
|
|
|
USER_SETTINGS_CHANGED: "USER_SETTINGS_CHANGED",
|
2013-09-29 02:01:18 +04:00
|
|
|
|
2013-10-23 03:01:35 +04:00
|
|
|
CLOSE_SETTINGS_DRAWER : "CLOSE_SETTINGS_DRAWER",
|
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
/**
|
|
|
|
* The framesheet was reseted and is now probably drastically different.
|
|
|
|
* Number of frames, content of frames, color used for the palette may have changed.
|
|
|
|
*/
|
2013-09-29 02:01:18 +04:00
|
|
|
PISKEL_RESET: "PISKEL_RESET",
|
2012-09-12 14:01:47 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
FRAME_SIZE_CHANGED : "FRAME_SIZE_CHANGED",
|
2012-09-16 20:48:32 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
SELECTION_CREATED: "SELECTION_CREATED",
|
|
|
|
SELECTION_MOVE_REQUEST: "SELECTION_MOVE_REQUEST",
|
|
|
|
SELECTION_DISMISSED: "SELECTION_DISMISSED",
|
2013-09-29 02:01:18 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
SHOW_NOTIFICATION: "SHOW_NOTIFICATION",
|
|
|
|
HIDE_NOTIFICATION: "HIDE_NOTIFICATION",
|
2012-09-12 14:01:47 +04:00
|
|
|
|
2013-11-18 01:07:26 +04:00
|
|
|
// Events triggered by keyboard
|
2013-08-10 14:11:16 +04:00
|
|
|
UNDO: "UNDO",
|
|
|
|
REDO: "REDO",
|
|
|
|
CUT: "CUT",
|
|
|
|
COPY: "COPY",
|
2013-11-18 01:07:26 +04:00
|
|
|
PASTE: "PASTE",
|
2013-11-19 02:53:12 +04:00
|
|
|
SELECT_TOOL : "SELECT_TOOL",
|
|
|
|
TOGGLE_HELP : "TOGGLE_HELP",
|
|
|
|
SWAP_COLORS : "SWAP_COLORS"
|
2012-08-31 12:45:07 +04:00
|
|
|
};
|