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

Method onTouchEnded

tools/xsbug/ConsolePane.js:122–131  ·  view source on GitHub ↗
(code, id, x, y, ticks)

Source from the content-addressed store, hash-verified

120 application.cursor = color ? cursors.link : cursors.iBeam;
121 }
122 onTouchEnded(code, id, x, y, ticks) {
123 super.onTouchEnded(code, id, x, y, ticks);
124 if ((this.mode == 0) && (code.selectionLength == 0)) {
125 let offset = code.findLineBreak(code.selectionOffset, false);
126 let color = this.colors.find(color => color.offset == offset && color.path !== undefined);
127 if (color) {
128 model.selectFile(color.path, { line:color.line });
129 }
130 }
131 }
132 onSelected(code) {
133 code.bubble("onCodeSelected");
134 }

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
selectFileMethod · 0.80

Tested by

no test coverage detected