Rev 7792 | Rev 7797 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7792 | Rev 7796 | ||
---|---|---|---|
Line 125... | Line 125... | ||
125 | int dashtype[2] = { 2 , 2 }; |
125 | int dashtype[2] = { 2 , 2 }; |
126 | int js_function[MAX_JS_FUNCTIONS]; /* javascript functions include objects on demand basis : only once per object type */ |
126 | int js_function[MAX_JS_FUNCTIONS]; /* javascript functions include objects on demand basis : only once per object type */ |
127 | for(i=0;i<MAX_JS_FUNCTIONS;i++){js_function[i]=0;} |
127 | for(i=0;i<MAX_JS_FUNCTIONS;i++){js_function[i]=0;} |
128 | int arrow_head = 8; /* size in px*/ |
128 | int arrow_head = 8; /* size in px*/ |
129 | int crosshair_size = 10; /* size in px*/ |
129 | int crosshair_size = 10; /* size in px*/ |
130 | int plot_steps = |
130 | int plot_steps = 250; |
131 | int found_size_command = 0; |
131 | int found_size_command = 0; |
132 | int click_cnt = 1; |
132 | int click_cnt = 1; |
133 | int clock_cnt = 0; /* counts the amount of clocks used -> unique object clock%d */ |
133 | int clock_cnt = 0; /* counts the amount of clocks used -> unique object clock%d */ |
134 | int linegraph_cnt = 0; /* identifier for command 'linegraph' ; multiple line graphs may be plotted in a single plot*/ |
134 | int linegraph_cnt = 0; /* identifier for command 'linegraph' ; multiple line graphs may be plotted in a single plot*/ |
135 | int use_mouse_coordinates = FALSE; |
135 | int use_mouse_coordinates = FALSE; |
Line 2703... | Line 2703... | ||
2703 | tmp_buffer = my_newmem(26); |
2703 | tmp_buffer = my_newmem(26); |
2704 | snprintf(tmp_buffer,25,"use_mouse_coordinates();\n");add_to_buffer(tmp_buffer); |
2704 | snprintf(tmp_buffer,25,"use_mouse_coordinates();\n");add_to_buffer(tmp_buffer); |
2705 | } |
2705 | } |
2706 | /* add global variables / contants */ |
2706 | /* add global variables / contants */ |
2707 | fprintf(js_include_file,"\n<!-- some extra global stuff : need to rethink panning and zooming !!! -->\n\ |
2707 | fprintf(js_include_file,"\n<!-- some extra global stuff : need to rethink panning and zooming !!! -->\n\ |
2708 | var precision = %d;var xmin=%f;var xmax=%f;var ymin=%f;\ |
- | |
2709 | var |
2708 | var precision = %d;var xmin_start=xmin;var xmax_start=xmax;\ |
2710 | var ymin_start=ymin;var ymax_start=xmax;\ |
2709 | var ymin_start=ymin;var ymax_start=xmax;\ |
2711 | var zoom_x_increment=0;var zoom_y_increment=0;\ |
2710 | var zoom_x_increment=0;var zoom_y_increment=0;\ |
2712 | var pan_x_increment=0;var pan_y_increment=0;\ |
2711 | var pan_x_increment=0;var pan_y_increment=0;\ |
2713 | if(use_ylogscale == 0 ){\ |
2712 | if(use_ylogscale == 0 ){\ |
2714 | zoom_x_increment = (xmax - xmin)/20;zoom_y_increment = (xmax - xmin)/20;pan_x_increment = (xmax - xmin)/20;pan_y_increment = (ymax - ymin)/20;\ |
2713 | zoom_x_increment = (xmax - xmin)/20;zoom_y_increment = (xmax - xmin)/20;pan_x_increment = (xmax - xmin)/20;pan_y_increment = (ymax - ymin)/20;\ |
Line 2730... | Line 2729... | ||
2730 | if(xmax<=xmin){xmin=xmin_start;xmax=xmax_start;};\ |
2729 | if(xmax<=xmin){xmin=xmin_start;xmax=xmax_start;};\ |
2731 | if(ymax<=ymin){ymin=ymin_start;ymax=ymax_start;};\ |
2730 | if(ymax<=ymin){ymin=ymin_start;ymax=ymax_start;};\ |
2732 | try{dragstuff.Zoom(xmin,xmax,ymin,ymax);}catch(e){}\ |
2731 | try{dragstuff.Zoom(xmin,xmax,ymin,ymax);}catch(e){}\ |
2733 | %s\ |
2732 | %s\ |
2734 | };\ |
2733 | };\ |
2735 | start_canvas%d(22);\ |
- | |
2736 | };\n\ |
2734 | };\n\ |
2737 | <!-- end wims_canvas_function -->\n\ |
2735 | <!-- end wims_canvas_function -->\n\ |
2738 | wims_canvas_function%d();\n",precision, |
2736 | wims_canvas_function%d();\n",precision,canvas_root_id,buffer,canvas_root_id); |
2739 | /* done writing the javascript include file */ |
2737 | /* done writing the javascript include file */ |
2740 | fclose(js_include_file); |
2738 | fclose(js_include_file); |
2741 | 2739 | ||
2742 | } |
2740 | } |
2743 | 2741 |