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

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

目录

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

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

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

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

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

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

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

                (line.handlers || (line.handlers = [])).push(f);

                return line;

            },

            lineInfo: lineInfo,

            addWidget: function(pos, node, scroll, vert, horiz) {

                pos = localCoords(clipPos(pos));

                var top = pos.yBot, left = pos.x;

                node.style.position = "absolute";

                code.appendChild(node);

                if (vert == "over") top = pos.y;

                else if (vert == "near") {

                    var vspace = Math.max(scroller.offsetHeight, doc.height * textHeight()),

                        hspace = Math.max(code.clientWidth, lineSpace.clientWidth) - paddingLeft();

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

                    if (pos.yBot + node.offsetHeight > vspace && pos.y > node.offsetHeight)

                        top = pos.y - node.offsetHeight;

                    if (left + node.offsetWidth > hspace)

                        left = hspace - node.offsetWidth;

                }

                node.style.top = (top + paddingTop()) + "px";

                node.style.left = node.style.right = "";

                if (horiz == "right") {

                    left = code.clientWidth - node.offsetWidth;

                    node.style.right = "0px";

                } else {

                    if (horiz == "left") left = 0;

                    else if (horiz == "middle") left = (code.clientWidth - node.offsetWidth) / 2;

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

                    node.style.left = (left + paddingLeft()) + "px";

                }

                if (scroll)

                    scrollIntoView(left, top, left + node.offsetWidth, top + node.offsetHeight);

            },

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

            lineCount: function() {return doc.size;},

            clipPos: clipPos,

            getCursor: function(start) {

                if (start == null) start = sel.inverted;

                return copyPos(start ? sel.from : sel.to);

            },

            somethingSelected: function() {return !posEq(sel.from, sel.to);},

            setCursor: operation(function(line, ch, user) {

                if (ch == null && typeof line.line == "number") setCursor(line.line, line.ch, user);

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

                else setCursor(line, ch, user);

            }),

你可能感兴趣的:(笙默考试管理系统,前端,javascript,开发语言)