笙默考试管理系统-MyExamTest----codemirror(19)

笙默考试管理系统-MyExamTest----codemirror(19

目录

一、 笙默考试管理系统-MyExamTest----codemirror

二、 笙默考试管理系统-MyExamTest----codemirror

三、 笙默考试管理系统-MyExamTest----codemirror

四、 笙默考试管理系统-MyExamTest----codemirror

五、 笙默考试管理系统-MyExamTest----codemirror

  • 笙默考试管理系统-MyExamTest----codemirror

 ++j;

            });

        }

        function updateGutter() {

            if (!options.gutter && !options.lineNumbers) return;

            var hText = mover.offsetHeight, hEditor = scroller.clientHeight;

            gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px";

            var html = [], i = showingFrom;

            doc.iter(showingFrom, Math.max(showingTo, showingFrom + 1), function(line) {

                if (line.hidden) {

                    html.push("

");

                } else {

  • 笙默考试管理系统-MyExamTest----codemirror

                    var marker = line.gutterMarker;

                    var text = options.lineNumbers ? i + options.firstLineNumber : null;

                    if (marker && marker.text)

                        text = marker.text.replace("%N%", text != null ? text : "");

                    else if (text == null)

                        text = "\u00a0";

  • 笙默考试管理系统-MyExamTest----codemirror

                    html.push((marker && marker.style ? '

' : "
"), text);

                    for (var j = 1; j < line.height; ++j) html.push("
 ");

                    html.push("

");

                }

                ++i;

            });

            gutter.style.display = "none";

            gutterText.innerHTML = html.join("");

            var minwidth = String(doc.size).length, firstNode = gutterText.firstChild, val = eltText(firstNode), pad = "";

  • 笙默考试管理系统-MyExamTest----codemirror

            while (val.length + pad.length < minwidth) pad += "\u00a0";

            if (pad) firstNode.insertBefore(targetDocument.createTextNode(pad), firstNode.firstChild);

            gutter.style.display = "";

            lineSpace.style.marginLeft = gutter.offsetWidth + "px";

            gutterDirty = false;

        }

  • 笙默考试管理系统-MyExamTest----codemirror

        function updateCursor() {

            var head = sel.inverted ? sel.from : sel.to, lh = textHeight();

            var pos = localCoords(head, true);

            var wrapOff = eltOffset(wrapper), lineOff = eltOffset(lineDiv);

            inputDiv.style.top = (pos.y + lineOff.top - wrapOff.top) + "px";

            inputDiv.style.left = (pos.x + lineOff.left - wrapOff.left) + "px";

            if (posEq(sel.from, sel.to)) {

                cursor.style.top = pos.y + "px";

                cursor.style.left = (options.lineWrapping ? Math.min(pos.x, lineSpace.offsetWidth) : pos.x) + "px";

                cursor.style.display = "";

            }

            else cursor.style.display = "none";

        }

你可能感兴趣的:(笙默考试管理系统,java)