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

Method onCursorAfter

tools/xsbug/behaviors.js:172–186  ·  view source on GitHub ↗
(code, offset)

Source from the content-addressed store, hash-verified

170 this.field = ("field" in dictionary) ? dictionary.field: false;
171 }
172 onCursorAfter(code, offset) {
173 var selectionMin, selectionMax, scrollerMin, scrollerMax, dx, dy;
174 if (offset < 0)
175 offset = 0;
176 if (shiftKey) {
177 if (offset <= this.cursorAnchor)
178 code.select(offset, this.cursorAnchor - offset);
179 else
180 code.select(this.cursorAnchor, offset - this.cursorAnchor);
181 this.cursorOffset = offset;
182 }
183 else
184 code.select(offset, 0)
185 this.onSelected(code);
186 }
187 onCursorBefore(code, sign) {
188 if (shiftKey) {
189 if (this.cursorOffset == null)

Callers 2

onCursorXMethod · 0.95
onCursorYMethod · 0.95

Calls 2

onSelectedMethod · 0.95
selectMethod · 0.45

Tested by

no test coverage detected