js-draw
Version:
Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript.
39 lines (38 loc) • 4.39 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.stretchXYSelectionShortcutId = exports.shrinkXYSelectionShortcutId = exports.stretchYSelectionShortcutId = exports.shrinkYSelectionShortcutId = exports.stretchXSelectionShortcutId = exports.shrinkXSelectionShortcutId = exports.rotateClockwiseSelectionShortcutId = exports.rotateCounterClockwiseSelectionShortcutId = exports.translateDownSelectionShortcutId = exports.translateUpSelectionShortcutId = exports.translateRightSelectionShortcutId = exports.translateLeftSelectionShortcutId = exports.sendToBackSelectionShortcut = exports.duplicateSelectionShortcut = exports.selectAllKeyboardShortcut = void 0;
const KeyboardShortcutManager_1 = __importDefault(require("../../shortcuts/KeyboardShortcutManager"));
// Selection
exports.selectAllKeyboardShortcut = 'jsdraw.tools.SelectionTool.selectAll';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.selectAllKeyboardShortcut, ['CtrlOrMeta+KeyA'], 'Select all');
exports.duplicateSelectionShortcut = 'jsdraw.tools.SelectionTool.duplicateSelection';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.duplicateSelectionShortcut, ['CtrlOrMeta+KeyD'], 'Duplicate selection');
exports.sendToBackSelectionShortcut = 'jsdraw.tools.SelectionTool.sendToBack';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.sendToBackSelectionShortcut, ['End'], 'Send to back');
exports.translateLeftSelectionShortcutId = 'jsdraw.tools.SelectionTool.translateLeft';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.translateLeftSelectionShortcutId, ['KeyA', 'KeyH', 'ArrowLeft'], 'Move selection left');
exports.translateRightSelectionShortcutId = 'jsdraw.tools.SelectionTool.translateRight';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.translateRightSelectionShortcutId, ['KeyD', 'KeyL', 'ArrowRight'], 'Move selection right');
exports.translateUpSelectionShortcutId = 'jsdraw.tools.SelectionTool.translateUp';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.translateUpSelectionShortcutId, ['KeyQ', 'KeyK', 'ArrowUp'], 'Move selection up');
exports.translateDownSelectionShortcutId = 'jsdraw.tools.SelectionTool.translateDown';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.translateDownSelectionShortcutId, ['KeyE', 'KeyJ', 'ArrowDown'], 'Move selection down');
exports.rotateCounterClockwiseSelectionShortcutId = 'jsdraw.tools.SelectionTool.rotateCCW';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.rotateCounterClockwiseSelectionShortcutId, ['Shift+KeyR'], 'Rotate selection counter clockwise');
exports.rotateClockwiseSelectionShortcutId = 'jsdraw.tools.SelectionTool.rotateCW';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.rotateClockwiseSelectionShortcutId, ['KeyR'], 'Rotate selection clockwise');
exports.shrinkXSelectionShortcutId = 'jsdraw.tools.SelectionTool.shrink.x';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.shrinkXSelectionShortcutId, ['KeyI'], 'Decrease width');
exports.stretchXSelectionShortcutId = 'jsdraw.tools.SelectionTool.stretch.x';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.stretchXSelectionShortcutId, ['Shift+KeyI'], 'Increase width');
exports.shrinkYSelectionShortcutId = 'jsdraw.tools.SelectionTool.shrink.y';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.shrinkYSelectionShortcutId, ['KeyO'], 'Decrease height');
exports.stretchYSelectionShortcutId = 'jsdraw.tools.SelectionTool.stretch.y';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.stretchYSelectionShortcutId, ['Shift+KeyO'], 'Increase height');
exports.shrinkXYSelectionShortcutId = 'jsdraw.tools.SelectionTool.shrink.xy';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.shrinkXYSelectionShortcutId, ['Comma'], 'Decrease selection size');
exports.stretchXYSelectionShortcutId = 'jsdraw.tools.SelectionTool.stretch.xy';
KeyboardShortcutManager_1.default.registerDefaultKeyboardShortcut(exports.stretchXYSelectionShortcutId, ['Period'], 'Increase selection size');
;