Changeset 1392 in genappalpha


Ignore:
Timestamp:
Feb 1, 2018, 11:49:43 PM (4 years ago)
Author:
alexey
Message:

New type 'plot3d' is implemented... based on JS Plotly.js library... It's very capable, addresses all we need.

Location:
languages
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • languages/html5.json

    r1383 r1392  
    492492                        ,{ "add/js/spectrum.min.js"                 : "once" }
    493493                        ,{ "add/js/jq.flot-0.8.3+eb+nav+sel.min.js" : "once" }
     494                        ,{ "add/js/plotly-latest.min.js"            : "once" }
    494495                        ,{ "add/js/uuid.min.js"                     : "once" }
    495496                        ,{ "add/js/autobahn.min.js"                 : "once" }
  • languages/html5/add/js/ga.min.js

    r1388 r1392  
    8585ga.value.showfields=function(a,b,c,d){var e=[];$.each(a[b],function(a,b){console.log(a);a==c[d]&&$.each(b,function(a,b){console.log(b);e.push(b)})});for(a=0;a<e.length;a++)$("#"+e[a]).data("repeater")&&$("#"+e[a]+"-repeater").show(),$("#"+e[a]+", label[for="+e[a]+"]").show()};
    8686ga.value.modifyformdata=function(a,b,c,d,e){var f=[],g,h;console.log(d);$.each(a[b],function(a,b){console.log(a);-1!==jQuery.inArray(a,d)&&$.each(b,function(a,b){f.push(b)})});f=ga.repeat.map.convert(f);for(a=0;a<f.length;a++){if($("#"+f[a]).data("repeater"))for(g in h=ga.repeat.children(b,f[a]),h)h=f[a]+"-"+g,c["delete"](h);c["delete"](f[a])}c.append("currentstage",ga.stages[b][e])};
    87 ga.value.processInputfromFiles=function(a,b,c,d){var e=a.trim().split(/[\r\n]+/g),f=[],g=0;c=ga.repeat.map.convert(c);for(var h=0;h<e.length;h++){var q=e[h].trim().split(/\s+/),g=g+q.length;f.push(g)}var g=[],k=[],r=[],n=[],z=[],u=[],q=[],x=0;switch(b){case "whitespace_formulchcompost":a=[];for(h=0;h<e.length;h++)f=e[h].split("#")[0],f=f.replace(/\s{2,}/g," "),f=f.replace(/\t/g," "),f=f.toString().trim().replace(/(\r\n|\n|\r)/g,""),a.push(f);for(var e=parseInt(a[1]),m,h=0;h<a.length;h++)if(2<h&&h<
     87ga.value.processInputfromFiles=function(a,b,c,d){var e=a.trim().split(/[\r\n]+/g),f=[],g=0;c=ga.repeat.map.convert(c);for(var h=0;h<e.length;h++){var q=e[h].trim().split(/\s+/),g=g+q.length;f.push(g)}var g=[],k=[],r=[],p=[],z=[],u=[],q=[],x=0;switch(b){case "whitespace_formulchcompost":a=[];for(h=0;h<e.length;h++)f=e[h].split("#")[0],f=f.replace(/\s{2,}/g," "),f=f.replace(/\t/g," "),f=f.toString().trim().replace(/(\r\n|\n|\r)/g,""),a.push(f);for(var e=parseInt(a[1]),m,h=0;h<a.length;h++)if(2<h&&h<
    88883+e)for(m=a[h].trim().split(/\s+/),f=0;f<m.length;f++)k.push(m[f]);else g.push(a[h]);q.push(k);for(h=0;h<c.length;h++)switch($("#"+c[h]).attr("type")){case "text":k=new RegExp($("#"+c[h]).attr("pattern"));if(!k.test(g[h])){ga.msg.box({icon:"warning.png",text:"Wrong format of the input file! Input value on the line #"+x+" is not a valid number. Options are: [Integer | Float point number | Number with exponent]. Check your input file",buttons:[{id:"ok",label:"OK"}]});return}break;case "number":k=[g[h]];
    8989if(ga.value.checkFloatIntOK("#"+c[h],k))g[h]=k[0];else{ga.msg.box({icon:"warning.png",text:"Wrong format of the input file! Input value on the line #"+x+" is not a valid number. Options are: [Integer | Float point number | Number with exponent]. Check your input file",buttons:[{id:"ok",label:"OK"}]});return}break;default:ga.msg.box({icon:"warning.png",text:"Selected input type is currently not supported. Contact the developer",buttons:[{id:"ok",label:"OK"}]});return}break;case "whitespace_formulchrg":case "whitespace_formulchcontrast":a=
    90 [];for(h=0;h<e.length;h++)f=e[h].split("#")[0],f=f.replace(/\s{2,}/g," "),f=f.replace(/\t/g," "),f=f.toString().trim().replace(/(\r\n|\n|\r)/g,""),a.push(f);for(var e=parseInt(a[1]),v=parseInt(a[2+e]),y=parseInt(a[5+e+v]),B=parseInt(a[9+e+v+y]),h=0;h<a.length;h++)if(1<h&&h<2+e)for(m=a[h].trim().split(/\s+/),f=0;f<m.length;f++)k.push(m[f]);else h>2+e&&h<3+e+v?(m=a[h].trim().split(/\s+/),r.push(m[1]),r.push(m[2]),r.push(m[0]),r.push(m[3])):h>5+e+v&&h<6+e+v+y?(m=a[h].trim().split(/\s+/),n.push(m[1]),
    91 n.push(m[2]),n.push(m[0]),n.push(m[3])):h>8+e+v+y&&h<9+e+v+y+B?(m=a[h].trim().split(/\s+/),z.push(m[1]),z.push(m[2]),z.push(m[0]),z.push(m[3])):g.push(a[h]);u.push(k);u.push(r);u.push(n);u.push(z);for(h=f=0;h<c.length;h++)if($("#"+c[h]).length)switch($("#"+c[h]).data("repeater")&&(q.push(u[f]),f++),$("#"+c[h]).attr("type")){case "text":k=new RegExp($("#"+c[h]).attr("pattern"));if(!k.test(g[h])){ga.msg.box({icon:"warning.png",text:"Wrong format of the input file! Input value on the line #"+x+" is not a valid number. Options are: [Integer | Float point number | Number with exponent]. Check your input file",
     90[];for(h=0;h<e.length;h++)f=e[h].split("#")[0],f=f.replace(/\s{2,}/g," "),f=f.replace(/\t/g," "),f=f.toString().trim().replace(/(\r\n|\n|\r)/g,""),a.push(f);for(var e=parseInt(a[1]),v=parseInt(a[2+e]),y=parseInt(a[5+e+v]),B=parseInt(a[9+e+v+y]),h=0;h<a.length;h++)if(1<h&&h<2+e)for(m=a[h].trim().split(/\s+/),f=0;f<m.length;f++)k.push(m[f]);else h>2+e&&h<3+e+v?(m=a[h].trim().split(/\s+/),r.push(m[1]),r.push(m[2]),r.push(m[0]),r.push(m[3])):h>5+e+v&&h<6+e+v+y?(m=a[h].trim().split(/\s+/),p.push(m[1]),
     91p.push(m[2]),p.push(m[0]),p.push(m[3])):h>8+e+v+y&&h<9+e+v+y+B?(m=a[h].trim().split(/\s+/),z.push(m[1]),z.push(m[2]),z.push(m[0]),z.push(m[3])):g.push(a[h]);u.push(k);u.push(r);u.push(p);u.push(z);for(h=f=0;h<c.length;h++)if($("#"+c[h]).length)switch($("#"+c[h]).data("repeater")&&(q.push(u[f]),f++),$("#"+c[h]).attr("type")){case "text":k=new RegExp($("#"+c[h]).attr("pattern"));if(!k.test(g[h])){ga.msg.box({icon:"warning.png",text:"Wrong format of the input file! Input value on the line #"+x+" is not a valid number. Options are: [Integer | Float point number | Number with exponent]. Check your input file",
    9292buttons:[{id:"ok",label:"OK"}]});return}break;case "number":k=[g[h]];if(ga.value.checkFloatIntOK("#"+c[h],k))g[h]=k[0];else{ga.msg.box({icon:"warning.png",text:"Wrong format of the input file! Input value on the line #"+x+" is not a valid number. Options are: [Integer | Float point number | Number with exponent]. Check your input file",buttons:[{id:"ok",label:"OK"}]});return}break;default:ga.msg.box({icon:"warning.png",text:"Selected input type is currently not supported. Contact the developer",buttons:[{id:"ok",
    9393label:"OK"}]});return}else f++;break;case "whitespaceseparated":case "whitespaceseparated_reverselogic":g=a.trim().split(/\s+/);if(g.length==c.length)for(h=0;h<g.length;h++){for(u=0;u<f.length;u++)if(h+1<=f[u]){x=u+1;break}switch($("#"+c[h]).attr("type")){case "checkbox":k=/^(0|1|n|y|true|false|t|f|yes|no)$/;if(!k.test(g[h].toLowerCase())){ga.msg.box({icon:"warning.png",text:"Wrong format of the input file! Checkbox input value on the line #"+x+" is not valid. Options are: [1 | 0 | yes | no | true | false | t | f | T | F | y | n | Y | N ]. Check your input file",
     
    9595x+" is not a valid number. Options are: [Integer | Float point number | Number with exponent]. Check your input file",buttons:[{id:"ok",label:"OK"}]});return}break;default:ga.msg.box({icon:"warning.png",text:"Selected input type is currently not supported. Contact the developer",buttons:[{id:"ok",label:"OK"}]});return}}else{ga.msg.box({icon:"warning.png",text:"Wrong format of the input file! Number of parameters is inconsistent with the model chosen. Check your parameter file",buttons:[{id:"ok",label:"OK"}]});
    9696return}break;default:ga.msg.box({icon:"warning.png",text:"Selected file parsing mode is currently not supported. Contact the developer",buttons:[{id:"ok",label:"OK"}]});return}for(h=x=0;h<g.length;h++){switch($("#"+c[h]).attr("type")){case "checkbox":if(0<=b.indexOf("reverselogic"))switch(g[h].toLowerCase()){case "0":case "false":case "f":case "n":case "no":$("#"+c[h]).prop("checked",!0);break;case "1":case "true":case "t":case "yes":case "y":case "r":$("#"+c[h]).prop("checked",!1);break}else switch(g[h].toLowerCase()){case "0":case "false":case "f":case "n":case "no":$("#"+
    97 c[h]).prop("checked",!1);break;case "1":case "true":case "t":case "yes":case "y":case "r":$("#"+c[h]).prop("checked",!0);break}default:$("#"+c[h]).val(g[h]),$("#"+c[h]).prop("defaultValue",g[h])}if($("#"+c[h]).data("repeater")){ga.repeat.change(d,c[h]);children=ga.repeat.children(d,c[h]);k=$("#"+c[h]).val();n=r=0;for(u=1;u<=k;++u)for(t in n=0,children)if(z=q[x][r],f=c[h]+"-"+t+"-"+(u-1),++n,"whitespace_formulchrg"!=b&&"whitespace_formulchcompost"!=b||1!=n)"whitespace_formulchcompost"==b&&2==n?("r"==
    98 z.toLowerCase()&&$("#"+f).prop("checked",!0),"f"==z.toLowerCase()&&$("#"+f).prop("checked",!1)):"whitespace_formulchcompost"==b&&5==n||$("#"+f).val(z),r++;ga.repeat.change(d,c[h]);x++}}};ga.value.input={};ga.value.setInputForRFile=function(a,b,c,d,e){ga.value.input[a]=ga.value.input[a]||{};ga.value.input[a][c]={};ga.value.input[a][c].id=c;ga.value.input[a][c].tag=b;ga.value.input[a][c].mode=d;ga.value.input[a][c].ids=e};ga.value.types={};
     97c[h]).prop("checked",!1);break;case "1":case "true":case "t":case "yes":case "y":case "r":$("#"+c[h]).prop("checked",!0);break}default:$("#"+c[h]).val(g[h]),$("#"+c[h]).prop("defaultValue",g[h])}if($("#"+c[h]).data("repeater")){ga.repeat.change(d,c[h]);children=ga.repeat.children(d,c[h]);k=$("#"+c[h]).val();p=r=0;for(u=1;u<=k;++u)for(t in p=0,children)if(z=q[x][r],f=c[h]+"-"+t+"-"+(u-1),++p,"whitespace_formulchrg"!=b&&"whitespace_formulchcompost"!=b||1!=p)"whitespace_formulchcompost"==b&&2==p?("r"==
     98z.toLowerCase()&&$("#"+f).prop("checked",!0),"f"==z.toLowerCase()&&$("#"+f).prop("checked",!1)):"whitespace_formulchcompost"==b&&5==p||$("#"+f).val(z),r++;ga.repeat.change(d,c[h]);x++}}};ga.value.input={};ga.value.setInputForRFile=function(a,b,c,d,e){ga.value.input[a]=ga.value.input[a]||{};ga.value.input[a][c]={};ga.value.input[a][c].id=c;ga.value.input[a][c].tag=b;ga.value.input[a][c].mode=d;ga.value.input[a][c].ids=e};ga.value.types={};
    9999ga.value.registerid=function(a,b,c,d){ga.value.types[a]=ga.value.types[a]||{};ga.value.types[a][b]={};ga.value.types[a][b].id=b;ga.value.types[a][b].label=c;ga.value.types[a][b].req=d||0};ga.value.setInputfromRFile=function(a,b,c,d){var e=c.split(",");a="results/users/"+$("#_state").data("_logon")+"/"+a;$.get(a,function(a){ga.value.processInputfromFiles(a,b,e,d)},"text")};
    100100ga.value.setInputfromFile=function(a,b,c,d){$(a).hide();var e=c.split(",");$(a).change(function(c){c=$(a)[0].files[0];var g=new FileReader;g.onload=function(a){ga.value.processInputfromFiles(a.target.result,b,e,d)};g.readAsText(c)})};
    101 ga.value.setLastValue=function(a,b,c){var d=a+":"+b+":last_value",e=a+":"+b+":default_value",f=$(b);if(!/_output$/.test(a))return!1;if(void 0==$("#global_data").data(d))switch(f.attr("type")){case "checkbox":case "radio":$("#global_data").data(d,f.is(":checked"));$("#global_data").data(e,f.is(":checked"));break;case "div":case "msgs":$("#global_data").data(d,f.html());$("#global_data").data(e,f.html());break;case "plot2d":break;case "bokeh":ga.bokeh.renderdata(a,b.replace(/^#/,""));break;case "filelink":case "filelinkm":$("#global_data").data(d,
    102 $(b+"_filelink").html());break;default:c&&f.val(c),$("#global_data").data(d,f.val()),$("#global_data").data(e,f.val())}else switch(f.attr("type")){case "checkbox":case "radio":f.prop("checked",$("#global_data").data(d));break;case "div":case "msgs":f.html($("#global_data").data(d));break;case "atomicstructure":b=b.replace(/^#/,"");$("#global_data").data(d)?(_jmol_info[b].script=$("#global_data").data(d),f.html(Jmol.getAppletHtml("jmolApplet"+b,_jmol_info[b]))):f.html("");break;case "plot2d":d=gd.data(d);
    103 d.data?(ga.value.set.plot2d(b,d.options),f.plot(d.data,ga.value.get.plot2d.plot_options(b,d.options))):f.plot(d,ga.value.get.plot2d.plot_options(b));break;case "bokeh":break;case "filelink":case "filelinkm":$(b+"_filelink").html($("#global_data").data(d));break;default:f.val($("#global_data").data(d))}};
     101ga.value.setLastValue=function(a,b,c){var d=a+":"+b+":last_value",e=a+":"+b+":default_value",f=$(b);if(!/_output$/.test(a))return!1;if(void 0==$("#global_data").data(d))switch(f.attr("type")){case "checkbox":case "radio":$("#global_data").data(d,f.is(":checked"));$("#global_data").data(e,f.is(":checked"));break;case "div":case "msgs":$("#global_data").data(d,f.html());$("#global_data").data(e,f.html());break;case "plot3d":console.log("PLOT3D: "+b);f=b.replace(/^#/,"");console.log("PLOT3D: "+f);Plotly.newPlot(f,
     102[],{});Plotly.purge(f);break;case "plot2d":break;case "bokeh":ga.bokeh.renderdata(a,b.replace(/^#/,""));break;case "filelink":case "filelinkm":$("#global_data").data(d,$(b+"_filelink").html());break;default:c&&f.val(c),$("#global_data").data(d,f.val()),$("#global_data").data(e,f.val())}else switch(f.attr("type")){case "checkbox":case "radio":f.prop("checked",$("#global_data").data(d));break;case "div":case "msgs":f.html($("#global_data").data(d));break;case "atomicstructure":b=b.replace(/^#/,"");
     103$("#global_data").data(d)?(_jmol_info[b].script=$("#global_data").data(d),f.html(Jmol.getAppletHtml("jmolApplet"+b,_jmol_info[b]))):f.html("");break;case "plot2d":d=gd.data(d);d.data?(ga.value.set.plot2d(b,d.options),f.plot(d.data,ga.value.get.plot2d.plot_options(b,d.options))):f.plot(d,ga.value.get.plot2d.plot_options(b));break;case "bokeh":break;case "filelink":case "filelinkm":$(b+"_filelink").html($("#global_data").data(d));break;default:f.val($("#global_data").data(d))}};
    104104ga.value.saveLastValue=function(a,b){var c=$(b);switch(c.attr("type")){case "file":break;case "checkbox":case "radio":$("#global_data").data(a+":"+b+":last_value",c.is(":checked"));break;case "div":case "msgs":$("#global_data").data(a+":"+b+":last_value",c.html());break;case "plot2d":break;case "bokeh":break;case "filelink":case "filelinkm":$("#global_data").data(a+":"+b+":last_value",$(b+"_filelink").html());break;case "atomicstructure":c=b.replace(/^#/,"");_jmol_info&&_jmol_info[c]&&_jmol_info[c].length?
    105105$("#global_data").data(a+":"+b+":last_value",_jmol_info[c].script):$("#global_data").data(a+":"+b+":last_value","");break;default:$("#global_data").data(a+":"+b+":last_value",c.val())}};ga.value.saveLastValues=function(a){$("#"+a+" :input").each(function(){ga.value.saveLastValue(a,"#"+$(this).attr("id"))})};
    106 ga.value.resetDefaultValue=function(a,b){var c=$(b);if("SELECT"==c.prop("tagName"))c.val($("#global_data").data(a+":"+b+":default_value"));else switch(c.attr("type")){case "file":return;case "checkbox":$("#global_data").removeData(a+":"+b+":repeat:count");case "radio":c.prop("checked",$("#global_data").data(a+":"+b+":default_value"));break;case "div":case "msgs":c.html($("#global_data").data(a+":"+b+":default_value"));break;case "filelink":case "filelinkm":$(b+"_filelink").html(" ");break;case "plot2d":$("#global_data").data(a+
    107 ":"+b+":last_value",[[]]);ga.value.clear.plot2d(b);c.plot([[]],ga.value.get.plot2d.plot_options(b));break;case "bokeh":ga.bokeh.reset(a,b.replace(/^#/,""));break;case "image":c.html("");break;case "video":c.html("");break;case "atomicstructure":b.replace(/^#/,"");$("#global_data").data(a+":"+b+":last_value","");$(b).html("");break;default:c.val(c.attr("value"))}ga.value.saveLastValue(a,b);$(b+"_msg").html("")};
    108 ga.value.resetDefaultValues=function(a,b){var c;if(!/_output$/.test(a))return!1;$("#"+a+" :input").each(function(){ga.value.resetDefaultValue(a,"#"+$(this).attr("id"))});ga.sync.reset(a);for(c in ga.value.extra_resets.data)ga.value.resetDefaultValue(a,"#"+c);b&&(ga.value.resetDefaultValue(a,"#"+a+"_msgs"),c="#"+a+"_textarea",ga.value.resetDefaultValue(a,c),$(c).hide(),$(c+"_label").hide())};
     106ga.value.resetDefaultValue=function(a,b){var c=$(b);if("SELECT"==c.prop("tagName"))c.val($("#global_data").data(a+":"+b+":default_value"));else switch(c.attr("type")){case "file":return;case "checkbox":$("#global_data").removeData(a+":"+b+":repeat:count");case "radio":c.prop("checked",$("#global_data").data(a+":"+b+":default_value"));break;case "div":case "msgs":c.html($("#global_data").data(a+":"+b+":default_value"));break;case "filelink":case "filelinkm":$(b+"_filelink").html(" ");break;case "plot2d":console.log("ga.value.resetDefaultValue() plot2d, t is "+
     107b);$("#global_data").data(a+":"+b+":last_value",[[]]);ga.value.clear.plot2d(b);c.plot([[]],ga.value.get.plot2d.plot_options(b));break;case "bokeh":ga.bokeh.reset(a,b.replace(/^#/,""));break;case "plot3d":console.log("reset default value for plot3d: "+b);Plotly.purge(b.replace(/^#/,""));break;case "image":c.html("");break;case "video":c.html("");break;case "atomicstructure":b.replace(/^#/,"");$("#global_data").data(a+":"+b+":last_value","");$(b).html("");break;default:c.val(c.attr("value"))}ga.value.saveLastValue(a,
     108b);$(b+"_msg").html("")};ga.value.resetDefaultValues=function(a,b){var c;if(!/_output$/.test(a))return!1;$("#"+a+" :input").each(function(){ga.value.resetDefaultValue(a,"#"+$(this).attr("id"))});ga.sync.reset(a);for(c in ga.value.extra_resets.data)ga.value.resetDefaultValue(a,"#"+c);b&&(ga.value.resetDefaultValue(a,"#"+a+"_msgs"),c="#"+a+"_textarea",ga.value.resetDefaultValue(a,c),$(c).hide(),$(c+"_label").hide())};
    109109ga.value.extra_resets=function(a){ga.value.extra_resets.data=ga.value.extra_resets.data||{};ga.value.extra_resets.data[a]=1};ga.value.extra_resets.clear=function(){ga.value.extra_resets.data={}};
    110110ga.value.setLastValueOutput=function(a){var b="#"+a,c=b+"_textarea",d=$(c);ga.value.setLastValue(a,b+"_msgs");ga.value.setLastValue(a,c);d.val()?(d.show(),$(c+"_label").show(),d.height(parseFloat(d.prop("scrollHeight"))+parseFloat(d.css("borderTopWidth"))+parseFloat(d.css("borderBottomWidth")))):(d.hide(),$(c+"_label").hide())};ga.value.get={};ga.value.set={};ga.value.clear={};
     
    133133ga.repeat.repeater=function(a,b,c,d){ga.repeat.data[a]=ga.repeat.data[a]||{};ga.repeat.data[a].repeater=ga.repeat.data[a].repeater||{};ga.repeat.data[a].repeater[b]=ga.repeat.data[a].repeater[b]||{};ga.repeat.data[a].repeater[b].type=c;d&&"__fields:tableize__"!=d&&!/^(off|false)$/i.test(d)&&(ga.repeat.data[a].repeater[b].tableize=1)};
    134134ga.repeat.children=function(a,b,c){var d;c=c||{};if(!(ga.repeat.data[a]&&ga.repeat.data[a].repeater&&ga.repeat.data[a].repeater[b]&&ga.repeat.data[a].repeater[b].child))return c;for(d=0;d<ga.repeat.data[a].repeater[b].child.length;++d)c[ga.repeat.data[a].repeater[b].child[d]]=!0,ga.repeat.data[a].repeater[d]&&(c=ga.repeat.children(a,d,c));return c};
    135 ga.repeat.change=function(a,b,c){var d,e=[],f="#"+b;d=$(f);var g,h="",q="",k,r,n;if(!(ga.repeat.data[a]&&ga.repeat.data[a].repeater&&ga.repeat.data[a].repeater[b]&&d.length))return!1;switch(ga.repeat.data[a].repeater[b].type){case "checkbox":d=d.prop("checked")?1:0;break;case "integer":case "listbox":d=d.val();break;default:return console.warn("ga.repeat.change( "+a+" , "+b+" ) type "+ga.repeat.data[a].repeater[b].type+" not supported"),!1}if(!c&&ga.repeat.data[a].repeater[b].value===d)return!1;g=
    136 ga.repeat.children(a,b);switch(ga.repeat.data[a].repeater[b].type){case "checkbox":if(d)for(k in g)n=b+"-"+k,ga.repeat.map[k]=n,h+=ga.repeat.data[a].repeat[k].htmlr.replace(/%%id%%/g,n).replace("%%label%%",""),q+=ga.repeat.data[a].repeat[k].evalr.replace(/%%id%%/g,n),ga.repeat.data[a].repeater[k]&&(ga.repeat.data[a].repeater[n]||(ga.repeat.data[a].repeater[n]=jQuery.extend({},ga.repeat.data[a].repeater[k])),e.push(n),ga.repeat.data[a].repeater[n].value&&delete ga.repeat.data[a].repeater[n].value);
    137 break;case "integer":if(ga.repeat.data[a].repeater[b].tableize&&0<d)for(k in g)h+=ga.repeat.data[a].repeat[k].htmls;for(r=1;r<=d;++r)for(k in g)n=b+"-"+k+"-"+(r-1),ga.repeat.map[k]=n,h+=ga.repeat.data[a].repeat[k].htmlr.replace(/%%id%%/g,n).replace("%%label%%","["+r+"]").replace(ga.repeat.data[a].repeater[b].tableize?/<td.*?><label.*?>.*?<\/label><\/td>/:"",""),q+=ga.repeat.data[a].repeat[k].evalr.replace(/%%id%%/g,n),ga.repeat.data[a].repeater[k]&&(ga.repeat.data[a].repeater[n]||(ga.repeat.data[a].repeater[n]=
    138 jQuery.extend({},ga.repeat.data[a].repeater[k])),e.push(n),ga.repeat.data[a].repeater[n].value&&delete ga.repeat.data[a].repeater[n].value);break;case "listbox":g=b.replace(/-[0-9]+$/,"").replace(/^(.*)-([A-ZA-z0-9_]*)$/,"$2")+"-"+d;r=b+"-"+d;g=ga.repeat.children(a,g);for(k in g)n=r+"-"+k,ga.repeat.map[k]=n,h+=ga.repeat.data[a].repeat[k].htmlr.replace(/%%id%%/g,n).replace("%%label%%",""),q+=ga.repeat.data[a].repeat[k].evalr.replace(/%%id%%/g,n),ga.repeat.data[a].repeater[k]&&(ga.repeat.data[a].repeater[n]||
    139 (ga.repeat.data[a].repeater[n]=jQuery.extend({},ga.repeat.data[a].repeater[k])),e.push(n),ga.repeat.data[a].repeater[n].value&&delete ga.repeat.data[a].repeater[n].value);break;default:return console.warn("ga.repeat.change( "+a+" , "+b+" ) type "+ga.repeat.data[a].repeater[b].type+" not supported"),!1}!/^<tr>/.test(h)&&/<\/tr>$/.test(h)&&(h="<tr>"+h);$(f+"-repeater").html(h);eval(q);ga.repeat.data[a].repeater[b].value=d;for(k=0;k<e.length;++k)ga.repeat.change(a,e[k],c);$("#global_data").data("_pull_json#"+
     135ga.repeat.change=function(a,b,c){var d,e=[],f="#"+b;d=$(f);var g,h="",q="",k,r,p;if(!(ga.repeat.data[a]&&ga.repeat.data[a].repeater&&ga.repeat.data[a].repeater[b]&&d.length))return!1;switch(ga.repeat.data[a].repeater[b].type){case "checkbox":d=d.prop("checked")?1:0;break;case "integer":case "listbox":d=d.val();break;default:return console.warn("ga.repeat.change( "+a+" , "+b+" ) type "+ga.repeat.data[a].repeater[b].type+" not supported"),!1}if(!c&&ga.repeat.data[a].repeater[b].value===d)return!1;g=
     136ga.repeat.children(a,b);switch(ga.repeat.data[a].repeater[b].type){case "checkbox":if(d)for(k in g)p=b+"-"+k,ga.repeat.map[k]=p,h+=ga.repeat.data[a].repeat[k].htmlr.replace(/%%id%%/g,p).replace("%%label%%",""),q+=ga.repeat.data[a].repeat[k].evalr.replace(/%%id%%/g,p),ga.repeat.data[a].repeater[k]&&(ga.repeat.data[a].repeater[p]||(ga.repeat.data[a].repeater[p]=jQuery.extend({},ga.repeat.data[a].repeater[k])),e.push(p),ga.repeat.data[a].repeater[p].value&&delete ga.repeat.data[a].repeater[p].value);
     137break;case "integer":if(ga.repeat.data[a].repeater[b].tableize&&0<d)for(k in g)h+=ga.repeat.data[a].repeat[k].htmls;for(r=1;r<=d;++r)for(k in g)p=b+"-"+k+"-"+(r-1),ga.repeat.map[k]=p,h+=ga.repeat.data[a].repeat[k].htmlr.replace(/%%id%%/g,p).replace("%%label%%","["+r+"]").replace(ga.repeat.data[a].repeater[b].tableize?/<td.*?><label.*?>.*?<\/label><\/td>/:"",""),q+=ga.repeat.data[a].repeat[k].evalr.replace(/%%id%%/g,p),ga.repeat.data[a].repeater[k]&&(ga.repeat.data[a].repeater[p]||(ga.repeat.data[a].repeater[p]=
     138jQuery.extend({},ga.repeat.data[a].repeater[k])),e.push(p),ga.repeat.data[a].repeater[p].value&&delete ga.repeat.data[a].repeater[p].value);break;case "listbox":g=b.replace(/-[0-9]+$/,"").replace(/^(.*)-([A-ZA-z0-9_]*)$/,"$2")+"-"+d;r=b+"-"+d;g=ga.repeat.children(a,g);for(k in g)p=r+"-"+k,ga.repeat.map[k]=p,h+=ga.repeat.data[a].repeat[k].htmlr.replace(/%%id%%/g,p).replace("%%label%%",""),q+=ga.repeat.data[a].repeat[k].evalr.replace(/%%id%%/g,p),ga.repeat.data[a].repeater[k]&&(ga.repeat.data[a].repeater[p]||
     139(ga.repeat.data[a].repeater[p]=jQuery.extend({},ga.repeat.data[a].repeater[k])),e.push(p),ga.repeat.data[a].repeater[p].value&&delete ga.repeat.data[a].repeater[p].value);break;default:return console.warn("ga.repeat.change( "+a+" , "+b+" ) type "+ga.repeat.data[a].repeater[b].type+" not supported"),!1}!/^<tr>/.test(h)&&/<\/tr>$/.test(h)&&(h="<tr>"+h);$(f+"-repeater").html(h);eval(q);ga.repeat.data[a].repeater[b].value=d;for(k=0;k<e.length;++k)ga.repeat.change(a,e[k],c);$("#global_data").data("_pull_json#"+
    140140b)&&ga.pull.doPull("#"+b);resetHoverHelp()};ga.repeat.map.convert=function(a){var b,c=[];for(b=0;b<a.length;++b)c[b]=ga.repeat.map[a[b]]||a[b];return c};ga.hide=function(a,b){ga.hide.data=ga.hide.data||{};ga.hide.data[a]=ga.hide.data[a]||{};ga.hide.data[a][b]=ga.hide.data[a][b]||{};ga.hide.data[a][b].active=1};ga.hide.data={};
    141141ga.hide.update=function(a,b){var c;if(ga.hide.data[a]&&ga.hide.data[a][b])if(ga.hide.data[a][b].hides){if($(b).prop("checked"))for(c in ga.hide.data[a][b].hides)$(c+"-itd").html(" "),$(c).hide();else for(c in ga.hide.data[a][b].hides)$(c+"-itd").html(ga.hide.data[a][b].hides[c]),$(c).show();setHoverHelp()}else console.log("ga.hide.update( "+a+" , "+b+" ) error, no hides attached to this hider");else console.log("ga.hide.update( "+a+" , "+b+" ) error, hider has not been defined")};
     
    144144ga.data.create_image_htmltocanvas=function(a){if($("#"+a+"_savetofile").length){var b=$("#"+a+"_div");html2canvas(b.get(0),{background:"#ffffff",onrendered:function(b){b='<a href="'+b.toDataURL("image/png").replace("image/png","image/octet-stream")+'" target="_blank" download="plot.png">plot.png</a>';$("#"+a+"_savetofile_link").html(b)}})}};
    145145ga.data.create_image=function(a,b){if($("#"+a+"_savetofile").length){var c=document.getElementById(a+"_savetofile"),d=b.getCanvas().toDataURL("image/png").replace("image/png","image/octet-stream"),d=ga.data.dataURLtoFile(d,"plot.png");c.href=URL.createObjectURL(d);$("#"+a+"_savetofile").removeClass("hidden")}};
    146 ga.data.update=function(a,b,c,d){var e=0,f=0,g=0,h=0,q=0,k=a+"_output",r="#"+k,n=$(r),z={},u=r+"_msgs",x=$(u),m,v,y,B,w,C,A;c&&($("#"+a+"_progress").html(""),x.text(""));$.each(b,function(p,l){A=n.find("#"+p);if(A.length)switch(e||(x.text(""),e=1),A.attr("type")){case "plot2d":m="#"+p;ga.value.plot2d.zstack.reset(m);if(l.data){if(ga.value.set.plot2d(m,l.options),ga.plotglobal=l.options,ga.dataplotglobal=l.data,$.plot(m,l.data,ga.value.get.plot2d.plot_options(m,l.options)),ga.customtooltips){var u=
    147 null;$(m).bind("plothover",function(a,b,c){c?u!=c.dataIndex&&(u=c.dataIndex,$("#rtooltip").remove(),c.datapoint[0].toFixed(2),c.datapoint[1].toFixed(2),c.series.tooltips.length&&showTooltip(c.pageX,c.pageY,c.series.tooltips[c.dataIndex],c.series.color)):($("#rtooltip").remove(),u=null)})}}else $.plot(m,l,ga.value.get.plot2d.plot_options(m));$(m+"_savetofile").length&&$(m+"_savetofile").removeClass("hidden");$(m+"_changescalex").length&&($(m+"_changescalex").removeClass("hidden"),"log"==l.options.xscale?
    148 $(m+"_changescalex_message").html("X-log"):$(m+"_changescalex_message").html("X-lin"));$(m+"_changescaley").length&&($(m+"_changescaley").removeClass("hidden"),"log"==l.options.yscale?$(m+"_changescaley_message").html("Y-log"):$(m+"_changescaley_message").html("Y-lin"));if(ga.value.settings[m].selzoom||l.options&&l.options.selection&&l.options.selection.mode&&"xy"==l.options.selection.mode)$(m).on("plotselected",{htag:m,data:l.data?l.data:l,options:l.data?ga.value.get.plot2d.plot_options(m,l.options):
    149 ga.value.get.plot2d.plot_options(m)},function(a,b){1E-5>b.xaxis.to-b.xaxis.from&&(b.xaxis.to=b.xaxis.from+1E-5);1E-5>b.yaxis.to-b.yaxis.from&&(b.yaxis.to=b.yaxis.from+1E-5);ga.value.plot2d.zstack.dopush(a.data.htag,b);$.plot(a.data.htag,a.data.data,$.extend(!0,{},a.data.options,{xaxis:{min:b.xaxis.from,max:b.xaxis.to},yaxis:{min:b.yaxis.from,max:b.yaxis.to}}))}).on("contextmenu",{htag:m,data:l.data?l.data:l,options:l.data?ga.value.get.plot2d.plot_options(m,l.options):ga.value.get.plot2d.plot_options(m)},
    150 function(a){a.preventDefault();var b=ga.value.plot2d.zstack.dopop(a.data.htag);b?$.plot(a.data.htag,a.data.data,$.extend(!0,{},a.data.options,{xaxis:{min:b.xaxis.from,max:b.xaxis.to},yaxis:{min:b.yaxis.from,max:b.yaxis.to}})):$.plot(a.data.htag,a.data.data,a.data.options)});y=k+":#"+p+":last_value";$("#global_data").data(y,l);break;case "bokeh":ga.bokeh.render(a,p,l);break;case "atomicstructure":y=k+":#"+p+":last_value";C=l.file?l.file:l;_jmol_info[p].script="set background ["+ga.colors.background+
    151 "]; set zoomlarge false;set echo top center;echo loading "+C.split("/").pop()+';refresh;load "'+C+'";';ga.set(a+":jsmoladd")&&(_jmol_info[p].script+=ga.set(a+":jsmoladd"));l.script&&(_jmol_info[p].script+=";"+l.script);$("#global_data").data(y,_jmol_info[p].script);$("#"+p).html(Jmol.getAppletHtml("jmolApplet"+p,_jmol_info[p]));break;case "checkbox":case "radio":A.prop("checked",!0);break;case "div":A.html(l);break;case "video":v=$("#"+p);w="<video ";v.attr("data-width")&&(w+=' width="'+v.attr("data-width")+
    152 '"');v.attr("data-height")&&(w+=' height="'+v.attr("data-height")+'"');w+=" controls>";w+='<source src="'+l+'.mp4" type="video/mp4" /><source src="'+l+'.webm" type="video/webm" />';w+="</video>";v.html(w);break;case "image":v=$("#"+p);w="<img ";v.attr("data-width")&&(w+=' width="'+v.attr("data-width")+'"');v.attr("data-height")&&(w+=' height="'+v.attr("data-height")+'"');w+=' src="'+l+'">';v.html(w);break;case "filelink":B='<a href="'+l+'" target="_blank">'+l.split("/").pop()+"</a>";y=k+":#"+p+":last_value";
    153 $("#global_data").data(y,B);$("#"+p+"_filelink").html(B);break;case "filelinkm":y=k+":#"+p+":last_value";B="";$.each(l,function(a,b){B+='<a href="'+b+'" target="_blank">'+b.split("/").pop()+"</a> "});$("#global_data").data(y,B);$("#"+p+"_filelink").html(B);break;default:$("#global_data").data("_append:"+k+"_"+p)?(A.val(A.val()+"\n"+l),A.height(parseFloat(A.prop("scrollHeight")+parseFloat(A.css("borderTopWidth"))+parseFloat(A.css("borderBottomWidth"))))):A.val(l)}else c?"_"==p.charAt(0)?/^_fs_/.test(p)&&
    154 ga.data.nofcrefresh[a]||("_message"==p&&ga.msg.box(l),"_question"==p&&ga.qr.question(a,b),"_question_answered"==p&&ga.qr.answered(a,b),"_question_timeout"==p&&ga.qr.timeout(a,b),/^_getinput/.test(p)&&"_getinput"==p&&ga.valuen.input(a,l),"_textarea"==p&&ga.data.textarea(r,l),"_airavata"==p&&ga.data.airavata(r,l),"_status"==p&&"complete"==l&&c(d,0,0)):(f||(x.append("<p>Unexpected results:</p>"),f=1),x.append("<p>"+p+" => "+l+"</p>")):"_"==p.charAt(0)?/^_fs_/.test(p)&&ga.data.nofcrefresh[a]||($("#_state").data(p,
    155 l),g=1,"_status"==p&&(z.job_status=l),/^_getinput/.test(p)&&"_getinput"==p&&ga.valuen.input(a,l),"_textarea"==p&&ga.data.textarea(r,l),"_airavata"==p&&ga.data.airavata(r,l),"_loginverify"==p&&ga.login.verify(l),"_loginapprove"==p&&ga.login.approve(l)):"-close"==p?h=1:"-close2"==p?q=1:(f||(x.text(""),x.append("<p>Unexpected results:</p>"),e=f=1),x.append("<p>"+p+" => "+l+"</p>"))});ga.value.saveLastValues(k);ga.value.saveLastValue(k,u);$(r+"_progress").html("");g&&syncState();h&&ga.msg.close(1);q&&
     146ga.data.update=function(a,b,c,d){var e=0,f=0,g=0,h=0,q=0,k=a+"_output",r="#"+k,p=$(r),z={},u=r+"_msgs",x=$(u),m,v,y,B,w,C,A;c&&($("#"+a+"_progress").html(""),x.text(""));$.each(b,function(n,l){A=p.find("#"+n);if(A.length)switch(e||(x.text(""),e=1),A.attr("type")){case "plot3d":m="#"+n;Plotly.plot(n,l.data,l.layout);break;case "plot2d":m="#"+n;ga.value.plot2d.zstack.reset(m);if(l.data){if(ga.value.set.plot2d(m,l.options),ga.plotglobal=l.options,ga.dataplotglobal=l.data,$.plot(m,l.data,ga.value.get.plot2d.plot_options(m,
     147l.options)),ga.customtooltips){var u=null;$(m).bind("plothover",function(a,b,c){c?u!=c.dataIndex&&(u=c.dataIndex,$("#rtooltip").remove(),c.datapoint[0].toFixed(2),c.datapoint[1].toFixed(2),c.series.tooltips.length&&showTooltip(c.pageX,c.pageY,c.series.tooltips[c.dataIndex],c.series.color)):($("#rtooltip").remove(),u=null)})}}else $.plot(m,l,ga.value.get.plot2d.plot_options(m));$(m+"_savetofile").length&&$(m+"_savetofile").removeClass("hidden");$(m+"_changescalex").length&&($(m+"_changescalex").removeClass("hidden"),
     148"log"==l.options.xscale?$(m+"_changescalex_message").html("X-log"):$(m+"_changescalex_message").html("X-lin"));$(m+"_changescaley").length&&($(m+"_changescaley").removeClass("hidden"),"log"==l.options.yscale?$(m+"_changescaley_message").html("Y-log"):$(m+"_changescaley_message").html("Y-lin"));if(ga.value.settings[m].selzoom||l.options&&l.options.selection&&l.options.selection.mode&&"xy"==l.options.selection.mode)$(m).on("plotselected",{htag:m,data:l.data?l.data:l,options:l.data?ga.value.get.plot2d.plot_options(m,
     149l.options):ga.value.get.plot2d.plot_options(m)},function(a,b){1E-5>b.xaxis.to-b.xaxis.from&&(b.xaxis.to=b.xaxis.from+1E-5);1E-5>b.yaxis.to-b.yaxis.from&&(b.yaxis.to=b.yaxis.from+1E-5);ga.value.plot2d.zstack.dopush(a.data.htag,b);$.plot(a.data.htag,a.data.data,$.extend(!0,{},a.data.options,{xaxis:{min:b.xaxis.from,max:b.xaxis.to},yaxis:{min:b.yaxis.from,max:b.yaxis.to}}))}).on("contextmenu",{htag:m,data:l.data?l.data:l,options:l.data?ga.value.get.plot2d.plot_options(m,l.options):ga.value.get.plot2d.plot_options(m)},
     150function(a){a.preventDefault();var b=ga.value.plot2d.zstack.dopop(a.data.htag);b?$.plot(a.data.htag,a.data.data,$.extend(!0,{},a.data.options,{xaxis:{min:b.xaxis.from,max:b.xaxis.to},yaxis:{min:b.yaxis.from,max:b.yaxis.to}})):$.plot(a.data.htag,a.data.data,a.data.options)});y=k+":#"+n+":last_value";$("#global_data").data(y,l);break;case "bokeh":ga.bokeh.render(a,n,l);break;case "atomicstructure":y=k+":#"+n+":last_value";C=l.file?l.file:l;_jmol_info[n].script="set background ["+ga.colors.background+
     151"]; set zoomlarge false;set echo top center;echo loading "+C.split("/").pop()+';refresh;load "'+C+'";';ga.set(a+":jsmoladd")&&(_jmol_info[n].script+=ga.set(a+":jsmoladd"));l.script&&(_jmol_info[n].script+=";"+l.script);$("#global_data").data(y,_jmol_info[n].script);$("#"+n).html(Jmol.getAppletHtml("jmolApplet"+n,_jmol_info[n]));break;case "checkbox":case "radio":A.prop("checked",!0);break;case "div":A.html(l);break;case "video":v=$("#"+n);w="<video ";v.attr("data-width")&&(w+=' width="'+v.attr("data-width")+
     152'"');v.attr("data-height")&&(w+=' height="'+v.attr("data-height")+'"');w+=" controls>";w+='<source src="'+l+'.mp4" type="video/mp4" /><source src="'+l+'.webm" type="video/webm" />';w+="</video>";v.html(w);break;case "image":v=$("#"+n);w="<img ";v.attr("data-width")&&(w+=' width="'+v.attr("data-width")+'"');v.attr("data-height")&&(w+=' height="'+v.attr("data-height")+'"');w+=' src="'+l+'">';v.html(w);break;case "filelink":B='<a href="'+l+'" target="_blank">'+l.split("/").pop()+"</a>";y=k+":#"+n+":last_value";
     153$("#global_data").data(y,B);$("#"+n+"_filelink").html(B);break;case "filelinkm":y=k+":#"+n+":last_value";B="";$.each(l,function(a,b){B+='<a href="'+b+'" target="_blank">'+b.split("/").pop()+"</a> "});$("#global_data").data(y,B);$("#"+n+"_filelink").html(B);break;default:$("#global_data").data("_append:"+k+"_"+n)?(A.val(A.val()+"\n"+l),A.height(parseFloat(A.prop("scrollHeight")+parseFloat(A.css("borderTopWidth"))+parseFloat(A.css("borderBottomWidth"))))):A.val(l)}else c?"_"==n.charAt(0)?/^_fs_/.test(n)&&
     154ga.data.nofcrefresh[a]||("_message"==n&&ga.msg.box(l),"_question"==n&&ga.qr.question(a,b),"_question_answered"==n&&ga.qr.answered(a,b),"_question_timeout"==n&&ga.qr.timeout(a,b),/^_getinput/.test(n)&&"_getinput"==n&&ga.valuen.input(a,l),"_textarea"==n&&ga.data.textarea(r,l),"_airavata"==n&&ga.data.airavata(r,l),"_status"==n&&"complete"==l&&c(d,0,0)):(f||(x.append("<p>Unexpected results:</p>"),f=1),x.append("<p>"+n+" => "+l+"</p>")):"_"==n.charAt(0)?/^_fs_/.test(n)&&ga.data.nofcrefresh[a]||($("#_state").data(n,
     155l),g=1,"_status"==n&&(z.job_status=l),/^_getinput/.test(n)&&"_getinput"==n&&ga.valuen.input(a,l),"_textarea"==n&&ga.data.textarea(r,l),"_airavata"==n&&ga.data.airavata(r,l),"_loginverify"==n&&ga.login.verify(l),"_loginapprove"==n&&ga.login.approve(l)):"-close"==n?h=1:"-close2"==n?q=1:(f||(x.text(""),x.append("<p>Unexpected results:</p>"),e=f=1),x.append("<p>"+n+" => "+l+"</p>"))});ga.value.saveLastValues(k);ga.value.saveLastValue(k,u);$(r+"_progress").html("");g&&syncState();h&&ga.msg.close(1);q&&
    156156ga.msg.close(2);return z};
    157157ga.data.textarea=function(a,b){var c=a+"_textarea",d=$(c);isatend=d[0].scrollHeight-d[0].scrollTop===d[0].clientHeight;b||(b="");d.is(":hidden")&&(d.show(),$(c+"_label").show());"__reset__\n"==b.substr(0,10)?d.val(b.substr(10)):d.val(d.val()+b);ga.set("textarea:rows")?ga.data.textarea.h[a]?d.height(ga.data.textarea.h[a]):ga.data.textarea.h[a]=parseFloat(d.prop("clientHeight"))+parseFloat(d.css("borderTopWidth"))+parseFloat(d.css("borderBottomWidth")):d.height(parseFloat(d.prop("scrollHeight"))+parseFloat(d.css("borderTopWidth"))+
     
    160160ga.sync.change=function(a,b,c){var d,e=$("#"+b);if(e&&$.isNumeric(e.val())&&ga.sync.data&&ga.sync.data[a]&&ga.sync.data[a][c])for(d in ga.sync.data[a][c]._lastval=e.val(),ga.sync.data[a][c])d!=b&&(a=$("#"+d))&&a.val()!=e.val()&&(a.val(e.val()),a.change())};ga.sync.reset=function(a){var b;if(ga.sync.data&&ga.sync.data[a])for(b in ga.sync.data[a])ga.sync.data[a][b]._lastval&&delete ga.sync.data[a][b]._lastval};ga.valuen={};ga.valuen.data={};ga.valuen.html={};ga.valuen.dflt={};ga.valuen.dflt.data={};
    161161ga.valuen.dflt.html={};ga.valuen.lastload="";
    162 ga.valuen.restore=function(a,b,c){var d="#"+a,e=$(d),f=e.find(":input").get(),g={},h,q;b=b||ga.valuen.data[a];c=c||ga.valuen.html[a];if(b){$(d+" .field_msg").html("");do h=!1,$.each(f,function(){var c,d,n=$(this),q,u;if(n.attr("data-repeater")&&!g[this.name]){g[this.name]=!0;if(this.name&&(b[this.name]||/checkbox|radio/i.test(this.type))){d=b[this.name];if(/checkbox|radio/i.test(this.type)){q=n.val();u=!1;if(d)for(c=0;c<d.length;c++)if(d[c]==q){u=!0;break}n.prop("checked",u)}else n.val(d[0]);h=!0;
     162ga.valuen.restore=function(a,b,c){var d="#"+a,e=$(d),f=e.find(":input").get(),g={},h,q;b=b||ga.valuen.data[a];c=c||ga.valuen.html[a];if(b){$(d+" .field_msg").html("");do h=!1,$.each(f,function(){var c,d,p=$(this),q,u;if(p.attr("data-repeater")&&!g[this.name]){g[this.name]=!0;if(this.name&&(b[this.name]||/checkbox|radio/i.test(this.type))){d=b[this.name];if(/checkbox|radio/i.test(this.type)){q=p.val();u=!1;if(d)for(c=0;c<d.length;c++)if(d[c]==q){u=!0;break}p.prop("checked",u)}else p.val(d[0]);h=!0;
    163163ga.repeat.change(a,this.name,!0);f=e.find(":input").get();return!1}b[this.name]||/checkbox|radio/i.test(this.type)||console.warn("ga.valuen.restore() no data found for repeater setting value on "+this.name+" type "+this.type+" to "+d[0])}});while(h);$.each(f,function(){var c,d,e,f,h;if(this.name&&!g[this.name])if(e=$(this),(b[this.name]||/checkbox|radio/i.test(this.type))&&!/button/i.test(this.nodeName))if(d=b[this.name],/checkbox|radio/i.test(this.type)){f=e.val();h=!1;if(d)for(c=0;c<d.length;c++)if(d[c]==
    164164f){h=!0;break}e.prop("checked",h)}else"file"===this.type?d[0]?$("#"+this.id+"_msg").html(" "+d[0]+" please reload manually (programmatic setting of local files disallowed by browser security)"):e.val(""):e.val(d[0]);else if(/button/i.test(this.nodeName)&&(d=e.attr("data-type"))&&(e=ga.altfile.button.getnames(this.id,d)))for(c=0;c<e.length;++c)b[e[c]]&&ga.altfile.button.addhtml(a,this.id,d,b[e[c]])});for(q in c)$("#"+q).html(c[q])}};
  • languages/html5/js/data.js

    r1388 r1392  
    117117            switch ( match.attr( "type" ) )
    118118            {
     119            case "plot3d" :
     120                htag = "#" + k;
     121                Plotly.plot(k, v.data, v.layout);
     122                break;
    119123            case "plot2d" :
    120124                __~debug:plottwod{console.log( "ga.data.update v is " );console.dir( v );}
  • languages/html5/js/value.js

    r1378 r1392  
    717717                $( "#global_data" ).data( dv, t.html() );
    718718                break;
    719             case "plot2d" :
     719            case "plot3d" :
     720                console.log("PLOT3D: " + tag);
     721                var tag_s = tag;
     722                tag_s = tag_s.replace(/^#/, "");
     723                console.log("PLOT3D: " + tag_s);
     724                Plotly.newPlot(tag_s,[],{});
     725                Plotly.purge(tag_s);
     726                break;
     727            case "plot2d" :
    720728               __~debug:values{console.log( "ga.value.setLastValue() on undefined plot2d not yet: " + tl );}
    721729               __~debug:plottwod{console.log( "ga.value.setLastValue() on undefined plot2d not yet: " + tl );}
     
    865873          case "plot2d" :
    866874__~debug:plottwod{                     console.log( "ga.value.resetDefaultValue() plot2d" );}
     875                        console.log( "ga.value.resetDefaultValue() plot2d, t is " + tag );
    867876                        $( "#global_data" ).data( pkg + ":" + tag + ":last_value", [[]] );
    868877                        ga.value.clear.plot2d( tag );
    869                         t.plot( [[]], ga.value.get.plot2d.plot_options( tag ) ); break;
     878                        t.plot( [[]], ga.value.get.plot2d.plot_options( tag ) );
    870879                        break;
    871880          case "bokeh" :
     
    873882              ga.bokeh.reset( pkg, tag.replace( /^#/, "" ) );
    874883              break;
     884          case "plot3d" :
     885              console.log( "reset default value for plot3d: " + tag );
     886              Plotly.purge(tag.replace( /^#/, "" ));
     887              break;
    875888          case "image" :
    876889          __~debug:image{console.log( "reset default value for image" );}
Note: See TracChangeset for help on using the changeset viewer.