MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / onTouchBegan

Method onTouchBegan

examples/commodetto/mini-drag/main.js:109–114  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

107 );
108 }
109 onTouchBegan(x, y) {
110 this.anchor.x = this.bounds.x - x;
111 this.anchor.y = this.bounds.y - y;
112 this.state = 1;
113 this.update();
114 }
115 onTouchMoved(x, y) {
116 let currentBounds = this.bounds;
117 let newBounds = new Rectangle(this.anchor.x + x, this.anchor.y + y, this.bounds.w, this.bounds.h);

Callers

nothing calls this directly

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected