mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-27 10:44:43 +08:00
Input refactoring (#12)
* Fix folder name typo * Smaller fixes * Shortcut rename to Shortcuts * Fix quoted attributes in UE 5.3 * remove KeyboardShortcutAction * Remove more trivial classes * Rename IKeyboardShortcut * Node delete shortcut
This commit is contained in:
30
js/input/keyboard/KeyboardEnableZoom.js
Normal file
30
js/input/keyboard/KeyboardEnableZoom.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import KeyboardShortcut from "./KeyboardShortcut.js"
|
||||
import Shortcuts from "../../Shortcuts.js"
|
||||
import Zoom from "../mouse/Zoom.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
export default class KeyboardEnableZoom extends KeyboardShortcut {
|
||||
|
||||
/** @type {Zoom} */
|
||||
#zoomInputObject
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} target
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.activationKeys = Shortcuts.enableZoomIn
|
||||
super(target, blueprint, options)
|
||||
}
|
||||
|
||||
fire() {
|
||||
this.#zoomInputObject = this.blueprint.template.getZoomInputObject()
|
||||
this.#zoomInputObject.enableZoonIn = true
|
||||
}
|
||||
|
||||
unfire() {
|
||||
this.#zoomInputObject.enableZoonIn = false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user