[LON-CAPA-cvs] cvs: loncom /html/adm/LC_math_editor/dist LC_math_editor.min.js

damieng damieng at source.lon-capa.org
Wed Apr 15 12:50:37 EDT 2015


damieng		Wed Apr 15 16:50:37 2015 EDT

  Modified files:              
    /loncom/html/adm/LC_math_editor/dist	LC_math_editor.min.js 
  Log:
  rebuilt math editor with comma arg separator
  
Index: loncom/html/adm/LC_math_editor/dist/LC_math_editor.min.js
diff -u loncom/html/adm/LC_math_editor/dist/LC_math_editor.min.js:1.3 loncom/html/adm/LC_math_editor/dist/LC_math_editor.min.js:1.4
--- loncom/html/adm/LC_math_editor/dist/LC_math_editor.min.js:1.3	Wed Feb 25 20:54:03 2015
+++ loncom/html/adm/LC_math_editor/dist/LC_math_editor.min.js	Wed Apr 15 16:50:37 2015
@@ -1,5 +1,5 @@
 'use strict';var LCMATH=function(){function l(){this.operators=[]}function e(b,a,c,g,f){this.type=b;this.op=a;this.value=c;this.children=g;this.interval_type="undefined"==typeof f?e.NOT_AN_INTERVAL:f}function p(b,a,c,g,f,e){this.id=b;this.arity=a;this.lbp=c;this.rbp=g;this.nud=f;this.led=e}function n(b,a,c){this.msg=b;this.from=a;this.to=c?c:this.from}function r(b,a,c){this.implicit_operators="undefined"==typeof b?!1:b;this.unit_mode="undefined"==typeof a?!1:a;this.constants="undefined"==typeof c||
-null==c?[]:c;this.defs=new l;this.defs.define();this.operators=this.defs.operators;this.oph={};for(b=0;b<this.operators.length;b++)this.oph[this.operators[b].id]=this.operators[b]}function t(b,a){this.defs=b;this.text=a}function k(b,a,c,g,f){this.type=b;this.from=a;this.to=c;this.value=g;this.op=f}l.ARG_SEPARATOR=";";l.DECIMAL_SIGN_1=".";l.DECIMAL_SIGN_2=",";l.INTERVAL_SEPARATOR=":";l.prototype.operator=function(b,a,c,g,f,e){this.operators.push(new p(b,a,c,g,f,e))};l.prototype.separator=function(b){this.operator(b,
+null==c?[]:c;this.defs=new l;this.defs.define();this.operators=this.defs.operators;this.oph={};for(b=0;b<this.operators.length;b++)this.oph[this.operators[b].id]=this.operators[b]}function t(b,a){this.defs=b;this.text=a}function k(b,a,c,g,f){this.type=b;this.from=a;this.to=c;this.value=g;this.op=f}l.ARG_SEPARATOR=",";l.DECIMAL_SIGN_1=".";l.DECIMAL_SIGN_2=".";l.INTERVAL_SEPARATOR=":";l.prototype.operator=function(b,a,c,g,f,e){this.operators.push(new p(b,a,c,g,f,e))};l.prototype.separator=function(b){this.operator(b,
 p.BINARY,0,0,null,null)};l.prototype.infix=function(b,a,c,g){var f;f=p.BINARY;g=g||function(a,d){var f=[d,a.expression(c)];return new e(e.OPERATOR,this,b,f)};this.operator(b,f,a,c,null,g)};l.prototype.prefix=function(b,a,c){var g;g=p.UNARY;c=c||function(c){c=[c.expression(a)];return new e(e.OPERATOR,this,b,c)};this.operator(b,g,0,a,c,null)};l.prototype.suffix=function(b,a,c){var g;g=p.UNARY;c=c||function(a,c){return new e(e.OPERATOR,this,b,[c])};this.operator(b,g,a,0,null,c)};l.prototype.findOperator=
 function(b){for(var a=0;a<this.operators.length;a++)if(this.operators[a].id==b)return this.operators[a];return null};l.prototype.buildInterval=function(b,a,c,g){g.advance(l.INTERVAL_SEPARATOR);var f=g.expression(0);if(null==g.current_token||null==g.current_token.op||")"!==g.current_token.op.id&&"]"!==g.current_token.op.id)throw new n("Wrong interval syntax.",g.tokens[g.token_nr-1].from);")"==g.current_token.op.id?(g.advance(")"),b=b?e.CLOSED_OPEN:e.OPEN_OPEN):(g.advance("]"),b=b?e.CLOSED_CLOSED:e.OPEN_CLOSED);
 return new e(e.INTERVAL,c,null,[a,f],b)};l.prototype.define=function(){this.suffix("!",160);this.infix("^",140,139);this.infix(".",130,129);this.infix("`",125,125,function(a,b){for(var g=a.expression(125);null!=a.current_token&&-1!="*/".indexOf(a.current_token.value);){var f=a.tokens[a.token_nr];if(null==f)break;if(f.type!=k.NAME&&"("!=f.value)break;f=a.tokens[a.token_nr+1];if(null!=f&&("("==f.value||f.type==k.NUMBER))break;if(a.unit_mode&&a.tokens[a.token_nr].type==k.NAME){for(var f=a.tokens[a.token_nr].value,




More information about the LON-CAPA-cvs mailing list