mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
feature : add keyboard shortcuts
+ decentralized shortcut declaration + each service/controller is now responsible for declaring its shorcuts - documentation (cheatsheet) is still to be maintained manually - init order matters (shortcutService has to be instanciated before everyone else) => should have a standalone KeyboardService singleton which is ready as soon as it is loaded
This commit is contained in:
12
js/app.js
12
js/app.js
@@ -10,6 +10,9 @@
|
||||
ns.app = {
|
||||
|
||||
init : function () {
|
||||
this.shortcutService = new pskl.service.keyboard.ShortcutService();
|
||||
this.shortcutService.init();
|
||||
|
||||
var size = this.readSizeFromURL_();
|
||||
var piskel = new pskl.model.Piskel(size.width, size.height);
|
||||
|
||||
@@ -20,6 +23,7 @@
|
||||
piskel.addLayer(layer);
|
||||
|
||||
this.piskelController = new pskl.controller.PiskelController(piskel);
|
||||
this.piskelController.init();
|
||||
|
||||
this.paletteController = new pskl.controller.PaletteController();
|
||||
this.paletteController.init();
|
||||
@@ -39,15 +43,15 @@
|
||||
this.settingsController = new pskl.controller.settings.SettingsController(this.piskelController);
|
||||
this.settingsController.init();
|
||||
|
||||
this.toolController = new pskl.controller.ToolController();
|
||||
this.toolController.init();
|
||||
|
||||
this.selectionManager = new pskl.selection.SelectionManager(this.piskelController);
|
||||
this.selectionManager.init();
|
||||
|
||||
this.historyService = new pskl.service.HistoryService(this.piskelController);
|
||||
this.historyService.init();
|
||||
|
||||
this.keyboardEventService = new pskl.service.KeyboardEventService();
|
||||
this.keyboardEventService.init();
|
||||
|
||||
this.notificationController = new pskl.controller.NotificationController();
|
||||
this.notificationController.init();
|
||||
|
||||
@@ -57,8 +61,6 @@
|
||||
this.imageUploadService = new pskl.service.ImageUploadService();
|
||||
this.imageUploadService.init();
|
||||
|
||||
this.toolController = new pskl.controller.ToolController();
|
||||
this.toolController.init();
|
||||
|
||||
this.cheatsheetService = new pskl.service.keyboard.CheatsheetService();
|
||||
this.cheatsheetService.init();
|
||||
|
||||
Reference in New Issue
Block a user