Repository navigation
Expand file tree
/
Copy pathhelp.js
More file actions
67 lines (63 loc) · 2.51 KB
/
Copy pathhelp.js
File metadata and controls
67 lines (63 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
8156
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* global POP */
/* global VERSION */
var HELP = new HELP_CLASS();
/**
* manages help actions
*
* @author ViliusL
*/
function HELP_CLASS() {
/**
* credits list config
*/
var CREDITS = [
{title: 'Brush styles', name: 'Harmony', link: 'http://ricardocabello.com/blog/post/689' },
{title: 'Effects library', name: 'glfx.js', link: 'http://evanw.github.io/glfx.js/' },
{title: 'EXIF', name: 'exif.js', link: 'https://github.com/jseidelin/exif-js' },
{title: 'Image filters', name: 'ImageFilters.js',link: 'https://github.com/arahaya/ImageFilters.js' },
{title: 'KD-tree', name: 'kdtree.js', link: 'http://jsdo.it/peko/wKvk' },
];
//shortcuts
this.help_shortcuts = function () {
POP.add({title: "D", value: 'Dublicate'});
POP.add({title: "Del", value: 'Delete selection'});
POP.add({title: "F", value: 'Auto adjust colors'});
POP.add({title: "G", value: 'Grid on/off'});
POP.add({title: "L", value: 'Rotate left'});
POP.add({title: "N", value: 'New layer'});
POP.add({title: "O", value: 'Open file(s)'});
POP.add({title: "R", value: 'Resize'});
POP.add({title: "S", value: 'Save'});
POP.add({title: "T", value: 'Trim'});
POP.add({title: "-", value: 'Zoom out'});
POP.add({title: "+", value: 'Zoom in'});
POP.add({title: "CTRL + Z", value: 'Undo'});
POP.add({title: "CTRL + A", value: 'Select all'});
POP.add({title: "CTRL + V", value: 'Paste'});
POP.add({title: "Arrow keys", value: 'Move active layer by 10px'});
POP.add({title: "CTRL + Arrow keys", value: 'Move active layer by 50px'});
POP.add({title: "SHIFT + Arrow keys", value: 'Move active layer by 1px'});
POP.add({title: "Drag & Drop", value: 'Imports images/xml data'});
POP.show('Keyboard Shortcuts', '');
};
//credits
this.help_credits = function () {
for (var i in CREDITS) {
if (CREDITS[i].link != undefined)
POP.add({title: CREDITS[i].title, html: '<a href="' + CREDITS[i].link + '">' + CREDITS[i].name + '</a>'});
else
POP.add({title: CREDITS[i].title, html: CREDITS[i].name});
}
POP.show('Credits', '');
};
//about
this.help_about = function () {
var email = 'www.viliusl@gmail.com';
POP.add({title: "Name:", value: "miniPaint " + VERSION});
POP.add({title: "Description:", value: 'online image editor'});
POP.add({title: "Author:", value: 'ViliusL'});
POP.add({title: "Email:", html: '<a href="mailto:' + email + '">' + email + '</a>'});
POP.add({title: "Source:", html: '<a href="https://github.com/viliusle/miniPaint">github.com/viliusle/miniPaint</a>'});
POP.show('About', '');
};
}