Develop and Download Open Source Software

Browse Subversion Repository

Diff of /SvgEditor.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by isao-hara, Wed Jul 21 07:59:50 2010 UTC revision 24 by isao-hara, Thu Jul 22 01:23:35 2010 UTC
# Line 33  var MgrPath=""; Line 33  var MgrPath="";
33  var nextId=1;  var nextId=1;
34    
35  var lineEdit=null;  var lineEdit=null;
36    
37  ////// SVG  ////// SVG
38  var svg_ns = 'http://www.w3.org/2000/svg';  var svg_ns = 'http://www.w3.org/2000/svg';
39  var svg_x=10;  var svg_x=10;
# Line 1896  function svgInputTextExec(e){ Line 1897  function svgInputTextExec(e){
1897    var inputform = document.getElementById('svg_input');    var inputform = document.getElementById('svg_input');
1898    var color=document.getElementById('svg_color');    var color=document.getElementById('svg_color');
1899    var size=document.getElementById('svg_size');    var size=document.getElementById('svg_size');
1900    var y = parseInt(inputform.style.top) + parseInt(size.value)*0.8;    var y = parseInt(inputform.style.top) + parseInt(size.value)*0.8 + 12;
1901      var x = parseInt(inputform.style.left) + 12;
1902    if(inputform.value){    if(inputform.value){
1903      targetItem=createSVGText(inputform.value, inputform.style.left, y, size.value, color.value);      targetItem=createSVGText(inputform.value, x, y, size.value, color.value);
1904    
1905      appendSVGObj(targetItem);      appendSVGObj(targetItem);
1906    }    }
1907    inputform.setAttribute("type", "hidden");    inputform.setAttribute("type", "hidden");
# Line 1907  function svgInputTextExec(e){ Line 1910  function svgInputTextExec(e){
1910    
1911  function svgInputFormAdjust(e){  function svgInputFormAdjust(e){
1912    var inputform = document.getElementById('svg_input');    var inputform = document.getElementById('svg_input');
1913    inputform.size = inputform.value.length + 1;    inputform.size = jstrlen(inputform.value) + 1;
1914    }
1915    
1916    function jstrlen(str) {
1917       var len = 0;
1918       str = escape(str);
1919       for (var i = 0; i < str.length; i++, len++) {
1920          if (str.charAt(i) == "%") {
1921             if (str.charAt(++i) == "u") {
1922                i += 3;
1923                len++;
1924             }
1925             i++;
1926          }
1927       }
1928       return len;
1929  }  }
1930    
1931  function putInputForm(x, y, txt, size){  function putInputForm(x, y, txt, size){

Legend:
Removed from v.23  
changed lines
  Added in v.24

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26