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