Commit b7d19d28 authored by Pascal Noisette's avatar Pascal Noisette

curseur pour l'export svg : javascript (fonctionne sous firefox : permet de suivre souris)

parent 83bfb929
......@@ -63,11 +63,11 @@ void Svg::init(const char *path){
<< "\t\t\t}\n"
<< "\t\tline\n"
<< "\t\t\t{\n"
<< "\t\t\t\tfill:white;stroke:#f8c71b;stroke-width:1\n"
<< "\t\t\t\tstroke:white;stroke-width:1\n"
<< "\t\t\t}\n"
<< "\t\tpolyline\n"
<< "\t\t\t{\n"
<< "\t\t\t\tfill:white;stroke:#f8c71b;stroke-width:1\n"
<< "\t\t\t\tfill:white;stroke:white;stroke-width:1\n"
<< "\t\t\t}\n"
<< "\t\tpath\n"
<< "\t\t\t{\n"
......@@ -115,7 +115,7 @@ void Svg::end(){
display_time_scale();
_thin_element_buffer << "\n</g></svg>";
_thin_element_buffer << "\n<line id='cursor' x1='550' y1='0' x2='550' y2='100%' style='display:none;stroke:black;stroke-width:0.5'/><script><![CDATA[var cursor = document.getElementById('cursor');cursor.style.display='';document.onmousemove = function (event){cursor.setAttribute('x1',event.clientX);cursor.setAttribute('x2',event.clientX);}]]> </script></g></svg>";
_svg_file.write(_thin_element_buffer.str().c_str(), _thin_element_buffer.str().size());
_thin_element_buffer.flush();
_thin_element_buffer.str("");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment