Node replace bug fix, names simplify

This commit is contained in:
barsdeveloper
2023-04-23 10:26:48 +02:00
parent 8a96af670e
commit 3ccd3ce9f3
15 changed files with 172 additions and 192 deletions

View File

@@ -140,7 +140,7 @@ export default class IMouseClickDrag extends IPointing {
* @param {Object} options
*/
constructor(target, blueprint, options = {}) {
options.clickButton ??= 0
options.clickButton ??= Configuration.mouseClickButton
options.consumeEvent ??= true
options.draggableElement ??= target
options.exitAnyButton ??= true
@@ -160,7 +160,7 @@ export default class IMouseClickDrag extends IPointing {
listenEvents() {
super.listenEvents()
this.#draggableElement.addEventListener("mousedown", this.#mouseDownHandler)
if (this.options.clickButton == 2) {
if (this.options.clickButton === Configuration.mouseRightClickButton) {
this.#draggableElement.addEventListener("contextmenu", e => e.preventDefault())
}
}