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

Function executeBracketLimited

lib/web/brackets.js:62–97  ·  view source on GitHub ↗
(bra, lineLimit)

Source from the content-addressed store, hash-verified

60 });
61}
62function executeBracketLimited(bra, lineLimit) {
63 bra.attr({
64 fill: "#afc"
65 }).animate({
66 fill: "#405560"
67 }, 500);
68
69 anchorLine = Math.max(cmGetLineNumber(bra.h1), cmGetLineNumber(bra.h2));
70
71 c = cm.getCursor();
72
73 fragment = cm.getDoc().getRange({
74 line: cmGetLineNumber(bra.h1),
75 ch: 0
76 }, {
77 line: lineLimit+ 1,
78 ch: 0
79 });
80
81 addr = "execution.fragment";
82 //if (disablePrint)
83 // addr = "execution.fragment.noprint"
84
85 _field.sendWithReturn(addr, {
86 box: cm.currentbox,
87 property: cm.currentproperty,
88 text: fragment,
89 lineoffset: cmGetLineNumber(bra.h1),
90 disabledRanges: "[" + allDisabledBracketRanges() + "]"
91 }, function (d, e) {
92 if (d.type == 'error')
93 appendRemoteOutputToLine(anchorLine, d.line + " : " + d.message, "Field-remoteOutput", "Field-remoteOutput-error", 1);
94 else
95 appendRemoteOutputToLine(anchorLine, d.message, "Field-remoteOutput-error", "Field-remoteOutput", 1)
96 });
97}
98
99
100function executeCurrentBracket() {

Callers 1

Calls 7

cmGetLineNumberFunction · 0.85
allDisabledBracketRangesFunction · 0.85
appendRemoteOutputToLineFunction · 0.85
animateMethod · 0.80
attrMethod · 0.45
maxMethod · 0.45
getRangeMethod · 0.45

Tested by

no test coverage detected