Subversion Repositories wimsdev

Rev

Rev 15659 | Rev 15663 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15659 Rev 15662
Line 919... Line 919...
919
  {
919
  {
920
   fprintf(js_include_file,"userdraw_primitive = %d;",u);
920
   fprintf(js_include_file,"userdraw_primitive = %d;",u);
921
  }
921
  }
922
  break;
922
  break;
923
  /* images : identical ! to userdraw images,bogus_color */
923
  /* images : identical ! to userdraw images,bogus_color */
-
 
924
  /* 14/1/2021 remove counter in draw_mathml_div() to adres OEF multidraw anstype issue
-
 
925
     var external_div_cnt=0;
-
 
926
     function draw_mathml_div(thing,id)
-
 
927
     var fix_div = document.createElement('DIV');
-
 
928
     var new_id='placed_'+external_div_cnt+'_'+id;
-
 
929
     fix_div.setAttribute('id',new_id);\
-
 
930
  */
924
  case 20:
931
  case 20:
925
  fprintf(js_include_file,"var current_id = null;var external_div_cnt=0;function image_adjust(image,x,y){\
932
  fprintf(js_include_file,"var current_id = null;function image_adjust(image,x,y){\
926
   var centered = %d;\
933
   var centered = %d;\
927
   var w = parseInt(image.width);var h = parseInt(image.height);\
934
   var w = parseInt(image.width);var h = parseInt(image.height);\
928
   switch(centered){\
935
   switch(centered){\
929
    case 0: return [x,y];break;\
936
    case 0: return [x,y];break;\
930
    case 1: return [x,parseInt(y-0.5*h)];break;\
937
    case 1: return [x,parseInt(y-0.5*h)];break;\
Line 955... Line 962...
955
   fix_div.innerHTML = thing.innerHTML;\
962
   fix_div.innerHTML = thing.innerHTML;\
956
   fix_div.setAttribute('style','display:none;position;absolute;width:'+w+'px;height:'+h+'px');\
963
   fix_div.setAttribute('style','display:none;position;absolute;width:'+w+'px;height:'+h+'px');\
957
   fix_div.width = w;fix_div.height = h;\
964
   fix_div.width = w;fix_div.height = h;\
958
   canvas_div.appendChild(fix_div);\
965
   canvas_div.appendChild(fix_div);\
959
   current_id = new_id;\
966
   current_id = new_id;\
960
   external_div_cnt++;\
-
 
961
   return;\
967
   return;\
962
  };function draw_mathml_svg(thing,id){\
968
  };function draw_mathml_svg(thing,id){\
963
   var fix_div = document.createElement('DIV');\
969
   var fix_div = document.createElement('DIV');\
964
   fix_div.setAttribute('style','display:none;position;relative');\
970
   fix_div.setAttribute('style','display:none;position;relative');\
965
   canvas_div.appendChild(fix_div);\
971
   canvas_div.appendChild(fix_div);\