Files
ueblueprint/js/input/keybaord/KeyboardEnableZoom.js
barsdeveloper f6cd5bba05 Zoom in fixed
2022-03-25 21:43:34 +01:00

31 lines
807 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)
this.#zoomInputObject.enableZoonIn = true
}
unfire() {
this.#zoomInputObject.enableZoonIn = false
}
}