firefox compiled fix
parent
3d5a092953
commit
962d755d89
|
@ -84,7 +84,8 @@ var supportsGoodTextCharPos_ = (function() {
|
|||
var text = document.createElementNS(svgns,'text');
|
||||
text.textContent = 'a';
|
||||
svgcontent.appendChild(text);
|
||||
var pos = text.getStartPositionOfChar(0).x;
|
||||
var pos = text.getStartPositionOfChar(0)
|
||||
pos = pos.x; //if you put it on one line it fails when compiled
|
||||
document.documentElement.removeChild(svgroot);
|
||||
return (pos === 0);
|
||||
})();
|
||||
|
|
|
@ -62,7 +62,7 @@ function(){return false})});return $(this)},disableContextMenuItems:function(h){
|
|||
0;n<b.length;n++)$(this).find('A[href="'+b[n]+'"]').parent().removeClass("disabled")});return $(this)},disableContextMenu:function(){$(this).each(function(){$(this).addClass("disabled")});return $(this)},enableContextMenu:function(){$(this).each(function(){$(this).removeClass("disabled")});return $(this)},destroyContextMenu:function(){$(this).each(function(){$(this).unbind("mousedown").unbind("mouseup")});return $(this)}})}(jQuery);var svgedit=svgedit||{};
|
||||
(function(){if(!svgedit.browser)svgedit.browser={};var a=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;svgedit.browser.supportsSvg=function(){return a};if(svgedit.browser.supportsSvg()){var q=navigator.userAgent,h=document.createElementNS("http://www.w3.org/2000/svg","svg"),b=!!window.opera,n=q.indexOf("AppleWebKit")>=0,u=q.indexOf("Gecko/")>=0,c=q.indexOf("MSIE")>=0,f=q.indexOf("Chrome/")>=0,d=q.indexOf("Windows")>=0,l=q.indexOf("Macintosh")>=
|
||||
0,s="ontouchstart"in window,C=!!h.querySelector,p=!!document.evaluate,L=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","path");na.setAttribute("d","M0,0 10,10");var fa=na.pathSegList;na=na.createSVGPathSegLinetoAbs(5,5);try{fa.replaceItem(na,0);return true}catch(aa){}return false}(),R=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","path");na.setAttribute("d","M0,0 10,10");var fa=na.pathSegList;na=na.createSVGPathSegLinetoAbs(5,5);try{fa.insertItemBefore(na,
|
||||
0);return true}catch(aa){}return false}(),O=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","svg"),fa=document.createElementNS("http://www.w3.org/2000/svg","svg");document.documentElement.appendChild(na);fa.setAttribute("x",5);na.appendChild(fa);var aa=document.createElementNS("http://www.w3.org/2000/svg","text");aa.textContent="a";fa.appendChild(aa);fa=aa.getStartPositionOfChar(0).x;document.documentElement.removeChild(na);return fa===0}(),K=function(){var na=document.createElementNS("http://www.w3.org/2000/svg",
|
||||
0);return true}catch(aa){}return false}(),O=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","svg"),fa=document.createElementNS("http://www.w3.org/2000/svg","svg");document.documentElement.appendChild(na);fa.setAttribute("x",5);na.appendChild(fa);var aa=document.createElementNS("http://www.w3.org/2000/svg","text");aa.textContent="a";fa.appendChild(aa);fa=aa.getStartPositionOfChar(0);fa=fa.x;document.documentElement.removeChild(na);return fa===0}(),K=function(){var na=document.createElementNS("http://www.w3.org/2000/svg",
|
||||
"svg");document.documentElement.appendChild(na);var fa=document.createElementNS("http://www.w3.org/2000/svg","path");fa.setAttribute("d","M0,0 C0,0 10,10 10,0");na.appendChild(fa);fa=fa.getBBox();document.documentElement.removeChild(na);return fa.height>4&&fa.height<5}(),P=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","svg");document.documentElement.appendChild(na);var fa=document.createElementNS("http://www.w3.org/2000/svg","path");fa.setAttribute("d","M0,0 10,0");var aa=
|
||||
document.createElementNS("http://www.w3.org/2000/svg","path");aa.setAttribute("d","M5,0 15,0");var V=document.createElementNS("http://www.w3.org/2000/svg","g");V.appendChild(fa);V.appendChild(aa);na.appendChild(V);fa=V.getBBox();document.documentElement.removeChild(na);return fa.width==15}(),T=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","rect");na.setAttribute("x",0.1);(na=na.cloneNode(false).getAttribute("x").indexOf(",")==-1)||$.alert("NOTE: This version of Opera is known to contain bugs in SVG-edit.\n\t\tPlease upgrade to the <a href='http://opera.com'>latest version</a> in which the problems have been fixed.");
|
||||
return na}(),M=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","rect");na.setAttribute("style","vector-effect:non-scaling-stroke");return na.style.vectorEffect==="non-scaling-stroke"}(),ha=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","rect").transform.baseVal,fa=h.createSVGTransform();na.appendItem(fa);return na.getItem(0)==fa}();svgedit.browser.isOpera=function(){return b};svgedit.browser.isWebkit=function(){return n};svgedit.browser.isGecko=function(){return u};
|
||||
|
|
|
@ -84,7 +84,8 @@ var supportsGoodTextCharPos_ = (function() {
|
|||
var text = document.createElementNS(svgns,'text');
|
||||
text.textContent = 'a';
|
||||
svgcontent.appendChild(text);
|
||||
var pos = text.getStartPositionOfChar(0).x;
|
||||
var pos = text.getStartPositionOfChar(0)
|
||||
pos = pos.x; //if you put it on one line it fails when compiled
|
||||
document.documentElement.removeChild(svgroot);
|
||||
return (pos === 0);
|
||||
})();
|
||||
|
|
|
@ -5,14 +5,16 @@
|
|||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
|
||||
<link rel="icon" type="image/png" href="images/logo.png"/>
|
||||
|
||||
<!--{if svg_edit_release}-->
|
||||
<link rel="stylesheet" href="svgedit.compiled.css" type="text/css"/>
|
||||
<!--{else}>
|
||||
<link rel="stylesheet" href="fonts.css" type="text/css"/>
|
||||
<!--{else}>
|
||||
<link rel="stylesheet" href="jgraduate/css/jPicker.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="jgraduate/css/jgraduate.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="svg-editor.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="spinbtn/JQuerySpinBtn.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="fonts.css" type="text/css"/>
|
||||
<!{endif}-->
|
||||
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
|
@ -56,21 +58,7 @@
|
|||
<script type="text/javascript" src="extensions/ext-server_opensave.js"></script>
|
||||
<!{endif}-->
|
||||
|
||||
<!-- you can load extensions here -->
|
||||
|
||||
<!-- Font Loader Start
|
||||
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
|
||||
<script type="text/javascript">
|
||||
google.load("webfont", "1");
|
||||
</script>
|
||||
<script type="text/javascript" src="font-selector/font-selector.js"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
Smm.init('tool_font_family');
|
||||
});
|
||||
</script>-->
|
||||
|
||||
<!-- Add script with custom handlers here -->
|
||||
<title>Method Draw</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -336,13 +324,12 @@ $(function(){
|
|||
<input id="font_family" data-title="Change Font Family" size="12" type="hidden" />
|
||||
<select id="font_family_dropdown">
|
||||
<option value="Helvetica, Arial, sans-serif" selected>Helvetica</option>
|
||||
<option value="Junction, sans-serif">Junction</option>
|
||||
<option value="'Museo Slab', serif">Museo Slab</option>
|
||||
<option value="Anivers, sans-serif">Anivers</option>
|
||||
<option value="Fertigo, sans-serif">Fertigo</option>
|
||||
<option value="Fanwood, serif">Fanwood</option>
|
||||
<option value="'League Gothic', serif">League Gothic</option>
|
||||
<option value="Georgia, serif">Georgia</option>
|
||||
<option value="Arvo, sans-serif">Arvo</option>
|
||||
<option value="Euphoria, sans-serif">Euphoria</option>
|
||||
<option value="Oswald, sans-serif">Oswald</option>
|
||||
<option value="'Shadows Into Light', serif">Shadows Into Light</option>
|
||||
<option value="'Simonetta', serif">Simonetta</option>
|
||||
<option value="Georgia, Times, 'Times New Roman', serif">Georgia</option>
|
||||
<option value="'Palatino Linotype', 'Book Antiqua', Palatino, serif">Palatino</option>
|
||||
<option value="'Times New Roman', Times, serif">Times</option>
|
||||
<option value="'Courier New', Courier, monospace">Courier</option>
|
||||
|
|
|
@ -62,7 +62,7 @@ function(){return false})});return $(this)},disableContextMenuItems:function(h){
|
|||
0;n<b.length;n++)$(this).find('A[href="'+b[n]+'"]').parent().removeClass("disabled")});return $(this)},disableContextMenu:function(){$(this).each(function(){$(this).addClass("disabled")});return $(this)},enableContextMenu:function(){$(this).each(function(){$(this).removeClass("disabled")});return $(this)},destroyContextMenu:function(){$(this).each(function(){$(this).unbind("mousedown").unbind("mouseup")});return $(this)}})}(jQuery);var svgedit=svgedit||{};
|
||||
(function(){if(!svgedit.browser)svgedit.browser={};var a=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;svgedit.browser.supportsSvg=function(){return a};if(svgedit.browser.supportsSvg()){var q=navigator.userAgent,h=document.createElementNS("http://www.w3.org/2000/svg","svg"),b=!!window.opera,n=q.indexOf("AppleWebKit")>=0,u=q.indexOf("Gecko/")>=0,c=q.indexOf("MSIE")>=0,f=q.indexOf("Chrome/")>=0,d=q.indexOf("Windows")>=0,l=q.indexOf("Macintosh")>=
|
||||
0,s="ontouchstart"in window,C=!!h.querySelector,p=!!document.evaluate,L=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","path");na.setAttribute("d","M0,0 10,10");var fa=na.pathSegList;na=na.createSVGPathSegLinetoAbs(5,5);try{fa.replaceItem(na,0);return true}catch(aa){}return false}(),R=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","path");na.setAttribute("d","M0,0 10,10");var fa=na.pathSegList;na=na.createSVGPathSegLinetoAbs(5,5);try{fa.insertItemBefore(na,
|
||||
0);return true}catch(aa){}return false}(),O=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","svg"),fa=document.createElementNS("http://www.w3.org/2000/svg","svg");document.documentElement.appendChild(na);fa.setAttribute("x",5);na.appendChild(fa);var aa=document.createElementNS("http://www.w3.org/2000/svg","text");aa.textContent="a";fa.appendChild(aa);fa=aa.getStartPositionOfChar(0).x;document.documentElement.removeChild(na);return fa===0}(),K=function(){var na=document.createElementNS("http://www.w3.org/2000/svg",
|
||||
0);return true}catch(aa){}return false}(),O=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","svg"),fa=document.createElementNS("http://www.w3.org/2000/svg","svg");document.documentElement.appendChild(na);fa.setAttribute("x",5);na.appendChild(fa);var aa=document.createElementNS("http://www.w3.org/2000/svg","text");aa.textContent="a";fa.appendChild(aa);fa=aa.getStartPositionOfChar(0);fa=fa.x;document.documentElement.removeChild(na);return fa===0}(),K=function(){var na=document.createElementNS("http://www.w3.org/2000/svg",
|
||||
"svg");document.documentElement.appendChild(na);var fa=document.createElementNS("http://www.w3.org/2000/svg","path");fa.setAttribute("d","M0,0 C0,0 10,10 10,0");na.appendChild(fa);fa=fa.getBBox();document.documentElement.removeChild(na);return fa.height>4&&fa.height<5}(),P=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","svg");document.documentElement.appendChild(na);var fa=document.createElementNS("http://www.w3.org/2000/svg","path");fa.setAttribute("d","M0,0 10,0");var aa=
|
||||
document.createElementNS("http://www.w3.org/2000/svg","path");aa.setAttribute("d","M5,0 15,0");var V=document.createElementNS("http://www.w3.org/2000/svg","g");V.appendChild(fa);V.appendChild(aa);na.appendChild(V);fa=V.getBBox();document.documentElement.removeChild(na);return fa.width==15}(),T=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","rect");na.setAttribute("x",0.1);(na=na.cloneNode(false).getAttribute("x").indexOf(",")==-1)||$.alert("NOTE: This version of Opera is known to contain bugs in SVG-edit.\n\t\tPlease upgrade to the <a href='http://opera.com'>latest version</a> in which the problems have been fixed.");
|
||||
return na}(),M=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","rect");na.setAttribute("style","vector-effect:non-scaling-stroke");return na.style.vectorEffect==="non-scaling-stroke"}(),ha=function(){var na=document.createElementNS("http://www.w3.org/2000/svg","rect").transform.baseVal,fa=h.createSVGTransform();na.appendItem(fa);return na.getItem(0)==fa}();svgedit.browser.isOpera=function(){return b};svgedit.browser.isWebkit=function(){return n};svgedit.browser.isGecko=function(){return u};
|
||||
|
|
Loading…
Reference in New Issue