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

Method constructor

packages/melonjs/src/renderable/dragndrop.js:20–51  ·  view source on GitHub ↗

* @param {number} x - the x coordinates of the drop target * @param {number} y - the y coordinates of the drop target * @param {number} width - drop target width * @param {number} height - drop target height

(x, y, width, height)

Source from the content-addressed store, hash-verified

18 * @param {number} height - drop target height
19 */
20 constructor(x, y, width, height) {
21 super(x, y, width, height);
22
23 this.isKinematic = false;
24
25 /**
26 * constant for the overlaps method
27 * @constant
28 * @type {string}
29 * @name CHECKMETHOD_OVERLAP
30 */
31 this.CHECKMETHOD_OVERLAP = "overlaps";
32
33 /**
34 * constant for the contains method
35 * @constant
36 * @type {string}
37 * @name CHECKMETHOD_CONTAINS
38 */
39 this.CHECKMETHOD_CONTAINS = "contains";
40
41 /**
42 * the checkmethod we want to use
43 * @constant
44 * @type {string}
45 * @name checkMethod
46 * @default "CHECKMETHOD_OVERLAP"
47 */
48 this.checkMethod = this.CHECKMETHOD_OVERLAP;
49
50 this.removeDragEndListener = on(DRAGEND, this.checkOnMe, this);
51 }
52
53 /**
54 * Sets the collision method which is going to be used to check a valid drop

Callers

nothing calls this directly

Calls 1

onFunction · 0.90

Tested by

no test coverage detected