mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-15 09:44:49 +08:00
Naming
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import UMouseClickDrag from "./UMouseClickDrag"
|
||||
import MouseClickDrag from "./MouseClickDrag"
|
||||
|
||||
export default class UDrag extends UMouseClickDrag {
|
||||
export default class Drag extends MouseClickDrag {
|
||||
constructor(target, blueprint, options) {
|
||||
super(target, blueprint, options)
|
||||
this.stepSize = parseInt(options?.stepSize)
|
||||
@@ -1,6 +1,6 @@
|
||||
import UMouseClickDrag from "./UMouseClickDrag"
|
||||
import MouseClickDrag from "./MouseClickDrag"
|
||||
|
||||
export default class UDragScroll extends UMouseClickDrag {
|
||||
export default class DragScroll extends MouseClickDrag {
|
||||
|
||||
dragTo(location, movement) {
|
||||
this.blueprint.scrollDelta([-movement[0], -movement[1]])
|
||||
@@ -1,9 +1,9 @@
|
||||
import UPointing from "./UPointing"
|
||||
import Pointing from "./Pointing"
|
||||
|
||||
/**
|
||||
* This class manages the ui gesture of mouse click and drag. Tha actual operations are implemented by the subclasses.
|
||||
*/
|
||||
export default class UMouseClickDrag extends UPointing {
|
||||
export default class MouseClickDrag extends Pointing {
|
||||
constructor(target, blueprint, options) {
|
||||
super(target, blueprint, options)
|
||||
this.clickButton = options?.clickButton ?? 0
|
||||
@@ -1,11 +1,11 @@
|
||||
import UPointing from "./UPointing"
|
||||
import Pointing from "./Pointing"
|
||||
|
||||
export default class UMouseWheel extends UPointing {
|
||||
export default class MouseWheel extends Pointing {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {HTMLElement} target
|
||||
* @param {import("../UEBlueprint").default} blueprint
|
||||
* @param {import("../UEBlueprint").EBlueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options) {
|
||||
@@ -1,11 +1,11 @@
|
||||
import Utility from "../Utility"
|
||||
|
||||
export default class UPointing {
|
||||
export default class Pointing {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
/** @type {HTMLElement} */
|
||||
this.target = target
|
||||
/** @type {import("../UEBlueprint").default}" */
|
||||
/** @type {import("../UEBlueprint").EBlueprint}" */
|
||||
this.blueprint = blueprint
|
||||
this.movementSpace = this.blueprint?.getGridDOMElement() ?? document.documentElement
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import UMouseClickDrag from "./UMouseClickDrag"
|
||||
import MouseClickDrag from "./MouseClickDrag"
|
||||
|
||||
export default class USelect extends UMouseClickDrag {
|
||||
export default class Select extends MouseClickDrag {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
super(target, blueprint, options)
|
||||
@@ -1,6 +1,6 @@
|
||||
import UMouseWheel from "./UMouseWheel";
|
||||
import MouseWheel from "./MouseWheel";
|
||||
|
||||
export default class UZoom extends UMouseWheel {
|
||||
export default class Zoom extends MouseWheel {
|
||||
wheel(variation, location) {
|
||||
let zoomLevel = this.blueprint.getZoom()
|
||||
zoomLevel -= variation
|
||||
Reference in New Issue
Block a user