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

发布时间:2023年12月26日

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

目录

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

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

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

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

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

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

????????return chunk.lines[n];

????}

????

????History.prototype = {

????????addChange: function(start, added, old) {

????????????this.undone.length = 0;

????????????var time = +new Date, last = this.done[this.done.length - 1];

????????????if (time - this.time > 400 || !last ||

????????????????last.start > start + added || last.start + last.added < start - last.added + last.old.length)

????????????????this.done.push({start: start, added: added, old: old});

????????????else {

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

????????????????var oldoff = 0;

????????????????if (start < last.start) {

????????????????????for (var i = last.start - start - 1; i >= 0; --i)

????????????????????????last.old.unshift(old[i]);

????????????????????last.added += last.start - start;

????????????????????last.start = start;

????????????????}

????????????????else if (last.start < start) {

????????????????????oldoff = start - last.start;

????????????????????added += oldoff;

????????????????}

????????????????for (var i = last.added - oldoff, e = old.length; i < e; ++i)

????????????????????last.old.push(old[i]);

????????????????if (last.added < added) last.added = added;

????????????}

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

????????????this.time = time;

????????}

????};

????function stopMethod() {e_stop(this);}

????// Ensure an event has a stop method.

????function addStop(event) {

????????if (!event.stop) event.stop = stopMethod;

????????return event;

????}

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

????function e_preventDefault(e) {

????????if (e.preventDefault) e.preventDefault();

????????else e.returnValue = false;

????}

????function e_stopPropagation(e) {

????????if (e.stopPropagation) e.stopPropagation();

????????else e.cancelBubble = true;

????}

????function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}

????CodeMirror.e_stop = e_stop;

????CodeMirror.e_preventDefault = e_preventDefault;

????CodeMirror.e_stopPropagation = e_stopPropagation;

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

????function e_target(e) {return e.target || e.srcElement;}

????function e_button(e) {

????????if (e.which) return e.which;

????????else if (e.button & 1) return 1;

????????else if (e.button & 2) return 3;

????????else if (e.button & 4) return 2;

????}

????// Event handler registration. If disconnect is true, it'll return a

????// function that unregisters the handler.

????function connect(node, type, handler, disconnect) {

????????if (typeof node.addEventListener == "function") {

????????????node.addEventListener(type, handler, false);

????????????if (disconnect) return function() {node.removeEventListener(type, handler, false);};

????????}

文章来源:https://blog.csdn.net/N201871643/article/details/135230685
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。