MCPcopy Index your code
hub / github.com/csev/py4e / scrollEditorIntoView

Function scrollEditorIntoView

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:1082–1089  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1080 }
1081
1082 function scrollEditorIntoView() {
1083 if (!cursor.getBoundingClientRect) return;
1084 var rect = cursor.getBoundingClientRect();
1085 // IE returns bogus coordinates when the instance sits inside of an iframe and the cursor is hidden
1086 if (ie && rect.top == rect.bottom) return;
1087 var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
1088 if (rect.top < 0 || rect.bottom > winH) cursor.scrollIntoView();
1089 }
1090 function scrollCursorIntoView() {
1091 var cursor = localCoords(sel.inverted ? sel.from : sel.to);
1092 var x = options.lineWrapping ? Math.min(cursor.x, lineSpace.offsetWidth) : cursor.x;

Callers 1

endOperationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected