Files
ueblueprint/js/input/keyboard/KeyboardEnableZoom.js
barsdeveloper fdd86ce5de Refactor jsdoc types (#16)
* WIP

* Fix type 1

* Missing types info

* Some fixes

* Several types refactoring and fixes

* WIP

* Fix grammar
2023-09-22 22:56:33 +02:00

29 lines
742 B
JavaScript

import KeyboardShortcut from "./KeyboardShortcut.js"
import Shortcuts from "../../Shortcuts.js"
import Zoom from "../mouse/Zoom.js"
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
}
}