MCPcopy Create free account
hub / github.com/melonjs/melonJS / dragMove

Method dragMove

packages/melonjs/src/renderable/draggable.js:92–97  ·  view source on GitHub ↗

* Gets called when the user drags this entity around * @param {object} e - the pointer event

(e)

Source from the content-addressed store, hash-verified

90 * @param {object} e - the pointer event
91 */
92 dragMove(e) {
93 if (this.dragging === true) {
94 this.pos.set(e.gameX, e.gameY, this.pos.z);
95 this.pos.sub(this.grabOffset);
96 }
97 }
98
99 /**
100 * Gets called when the user stops dragging the entity

Callers 1

initEventsMethod · 0.95

Calls 2

setMethod · 0.45
subMethod · 0.45

Tested by

no test coverage detected