mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-17 05:47:34 +08:00
Fix other interface classes naming convention
This commit is contained in:
22
js/input/mouse/IPointing.js
Normal file
22
js/input/mouse/IPointing.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import IContext from "../IContext"
|
||||
import Utility from "../../Utility"
|
||||
|
||||
export default class IPointing extends IContext {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
super(target, blueprint, options)
|
||||
this.movementSpace = this.blueprint?.getGridDOMElement() ?? document.documentElement
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {MouseEvent} mouseEvent
|
||||
* @returns
|
||||
*/
|
||||
locationFromEvent(mouseEvent) {
|
||||
return this.blueprint.compensateTranslation(
|
||||
Utility.convertLocation(
|
||||
[mouseEvent.clientX, mouseEvent.clientY],
|
||||
this.movementSpace))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user