MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / rectForLineHandle

Function rectForLineHandle

lib/web/brackets.js:112–137  ·  view source on GitHub ↗
(lh)

Source from the content-addressed store, hash-verified

110}
111
112function rectForLineHandle(lh) {
113 var y = cmGetLineNumber(lh);
114
115 if (y > -1) {
116 z = cm.charCoords({
117 line: y,
118 ch: 1
119 });
120
121 li = cm.lineInfo(y);
122 if (li) {
123 w = li.widgets;
124 if (w && w.length > 0) {
125 for (var i = 0; i < w.length; i++) {
126 z.bottom += $(w[i].node).height()
127 }
128 }
129 }
130
131 z.top -= $(lineNumbers).offset().top - 8;
132 z.bottom -= $(lineNumbers).offset().top - 8;
133
134 return z;
135 }
136 return null;
137}
138
139function pathStringForTwoLineHandles(lh1, lh2, level) {
140 r1 = rectForLineHandle(lh1);

Callers 1

Calls 3

cmGetLineNumberFunction · 0.85
offsetMethod · 0.80
$Function · 0.70

Tested by

no test coverage detected