mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 14:26:46 +00:00
updated shortcuts (H fro shape, better list, also sorted)
This commit is contained in:
parent
1699063904
commit
7e0d519e3c
@ -282,7 +282,6 @@ const menuDefinition = [
|
||||
{
|
||||
name: 'Histogram',
|
||||
ellipsis: true,
|
||||
shortcut: 'H',
|
||||
target: 'image/histogram.histogram'
|
||||
}
|
||||
]
|
||||
|
||||
@ -135,6 +135,7 @@ config.TOOLS = [
|
||||
{
|
||||
name: 'shape',
|
||||
on_activate: 'on_activate',
|
||||
title: 'Shapes (H)',
|
||||
attributes: {
|
||||
size: 3,
|
||||
stroke: '#00aa00',
|
||||
|
||||
@ -11,24 +11,27 @@ class Help_shortcuts_class {
|
||||
var settings = {
|
||||
title: 'Keyboard Shortcuts',
|
||||
params: [
|
||||
{title: "F9", value: 'Quick Save'},
|
||||
{title: "F10", value: 'Quick Load'},
|
||||
{title: "O", value: 'Open'},
|
||||
{title: "S", value: 'Export'},
|
||||
{title: "Shift + S", value: 'Save As'},
|
||||
{title: "T", value: 'Trim'},
|
||||
{title: "F", value: 'Auto Adjust Colors'},
|
||||
{title: "Ctrl + C", value: 'Copy to Clipboard'},
|
||||
{title: "D", value: 'Duplicate'},
|
||||
{title: "S", value: 'Export'},
|
||||
{title: "G", value: 'Grid on/off'},
|
||||
{title: "L", value: 'Rotate left'},
|
||||
{title: "N", value: 'New layer'},
|
||||
{title: "R", value: 'Resize'},
|
||||
{title: "I", value: 'Information'},
|
||||
{title: "N", value: 'New layer'},
|
||||
{title: "O", value: 'Open'},
|
||||
{title: "CTRL + V", value: 'Paste'},
|
||||
{title: "F10", value: 'Quick Load'},
|
||||
{title: "F9", value: 'Quick Save'},
|
||||
{title: "R", value: 'Resize'},
|
||||
{title: "L", value: 'Rotate left'},
|
||||
{title: "U", value: 'Ruler'},
|
||||
{title: "Shift + S", value: 'Save As'},
|
||||
{title: "CTRL + A", value: 'Select All'},
|
||||
{title: "H", value: 'Shapes'},
|
||||
{title: "T", value: 'Trim'},
|
||||
{title: "CTRL + Z", value: 'Undo'},
|
||||
{title: "Scroll up", value: 'Zoom in'},
|
||||
{title: "Scroll down", value: 'Zoom out'},
|
||||
{title: "CTRL + Z", value: 'Undo'},
|
||||
{title: "CTRL + A", value: 'Select All'},
|
||||
{title: "CTRL + V", value: 'Paste'},
|
||||
],
|
||||
};
|
||||
this.POP.show(settings);
|
||||
|
||||
@ -3,35 +3,12 @@ import Base_layers_class from './../../core/base-layers.js';
|
||||
import Dialog_class from './../../libs/popup.js';
|
||||
import Helper_class from './../../libs/helpers.js';
|
||||
|
||||
var instance = null;
|
||||
|
||||
class Image_histogram_class {
|
||||
|
||||
constructor() {
|
||||
//singleton
|
||||
if (instance) {
|
||||
return instance;
|
||||
}
|
||||
instance = this;
|
||||
|
||||
this.POP = new Dialog_class();
|
||||
this.Base_layers = new Base_layers_class();
|
||||
this.Helper = new Helper_class();
|
||||
|
||||
this.set_events();
|
||||
}
|
||||
|
||||
set_events() {
|
||||
document.addEventListener('keydown', (event) => {
|
||||
var code = event.keyCode;
|
||||
if (this.Helper.is_input(event.target))
|
||||
return;
|
||||
|
||||
if (code == 72) {
|
||||
//H - trim
|
||||
this.histogram();
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
histogram() {
|
||||
|
||||
@ -5,10 +5,19 @@ import Base_layers_class from './../core/base-layers.js';
|
||||
import Dialog_class from './../libs/popup.js';
|
||||
import GUI_tools_class from './../core/gui/gui-tools.js';
|
||||
|
||||
var instance = null;
|
||||
|
||||
class Shape_class extends Base_tools_class {
|
||||
|
||||
constructor(ctx) {
|
||||
super();
|
||||
|
||||
//singleton
|
||||
if (instance) {
|
||||
return instance;
|
||||
}
|
||||
instance = this;
|
||||
|
||||
this.Base_layers = new Base_layers_class();
|
||||
this.GUI_tools = new GUI_tools_class();
|
||||
this.POP = new Dialog_class();
|
||||
@ -17,6 +26,21 @@ class Shape_class extends Base_tools_class {
|
||||
this.layer = {};
|
||||
this.preview_width = 150;
|
||||
this.preview_height = 120;
|
||||
|
||||
this.set_events();
|
||||
}
|
||||
|
||||
set_events() {
|
||||
document.addEventListener('keydown', (event) => {
|
||||
var code = event.keyCode;
|
||||
if (this.Helper.is_input(event.target))
|
||||
return;
|
||||
|
||||
if (code == 72) {
|
||||
//H
|
||||
this.show_shapes();
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
load() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user