mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
29 lines
772 B
JavaScript
29 lines
772 B
JavaScript
import Configuration from "../../Configuration.js"
|
|
import IKeyboardShortcut from "./IKeyboardShortcut.js"
|
|
import Zoom from "../mouse/Zoom.js"
|
|
|
|
export default class KeyboardEnableZoom extends IKeyboardShortcut {
|
|
|
|
/** @type {Zoom} */
|
|
#zoomInputObject
|
|
|
|
/**
|
|
* @param {HTMLElement} target
|
|
* @param {import("../../Blueprint").default} blueprint
|
|
* @param {Object} options
|
|
*/
|
|
constructor(target, blueprint, options = {}) {
|
|
options.activationKeys = Configuration.enableZoomIn
|
|
super(target, blueprint, options)
|
|
}
|
|
|
|
fire() {
|
|
this.#zoomInputObject = this.blueprint.getInputObject(Zoom)
|
|
this.#zoomInputObject.enableZoonIn = true
|
|
}
|
|
|
|
unfire() {
|
|
this.#zoomInputObject.enableZoonIn = false
|
|
}
|
|
}
|