Commits

Chris Leonello committed 342960a

Fixes #71 where safari versions weren't properly detected for canvas font support.

  • Participants
  • Parent commits e34a056

Comments (0)

Files changed (3)

           </fileset>
         </replaceregexp>
         
-        <!-- <replaceregexp match='src="\./' replace='src="\.\./' flags="g">
-          <fileset dir="${DIST_DIR}/examples">
-            <include name="*.html" />
-          </fileset>
-        </replaceregexp>
-        
-        <replaceregexp match='href="\./src/' replace='href="\../' flags="g">
-          <fileset dir="${DIST_DIR}/examples" includes="*.html" />
-        </replaceregexp>
-        
-        <replaceregexp match='href="\./jquery.jqplot.css' replace='href="\../jquery.jqplot.css' flags="g">
-          <fileset dir="${DIST_DIR}/examples" includes="*.html" />
-        </replaceregexp>
-        
-        <replaceregexp match='src="\./src/' replace='src="\./' flags="g">
-          <fileset dir="${DIST_DIR}" includes="test*.html" />
-        </replaceregexp>
-        
-        <replaceregexp match='href="\./src/' replace='href="\./' flags="g">
-          <fileset dir="${DIST_DIR}" includes="test*.html" />
-        </replaceregexp> -->
-        
         <copy todir="${DIST_DIR}/plugins">
           <fileset dir="${BUILD_DIR}/plugins" includes="*" />
         </copy>

src/plugins/jqplot.canvasAxisLabelRenderer.js

         if (this.enableFontSupport) {
             if ($.browser.safari) {
                 var p = $.browser.version.split('.');
-                if (p[0] >= 528 && p[1] >= 16) {
+                for (var i=0; i<p.length; i++) { p[i] = Number(p[i]) };
+                if (p[0] > 528 || (p[0] == 528 && p[1] >= 16)) {
                     this._textRenderer = new $.jqplot.CanvasFontRenderer(ropts); 
                 }
             }
             else if ($.browser.mozilla) {
                 var p = $.browser.version.split(".");
-                if (p[0] > 1 || p[0] == 1 &&  p[1] >= 9 && p[2] > 0 ) {
+                if (p[0] > 1 || (p[0] == 1 &&  p[1] >= 9 && p[2] > 0) ) {
                     this._textRenderer = new $.jqplot.CanvasFontRenderer(ropts);
                 }
                 else {

src/plugins/jqplot.canvasAxisTickRenderer.js

         if (this.enableFontSupport) {
             if ($.browser.safari) {
                 var p = $.browser.version.split('.');
-                if (p[0] >= 528 && p[1] >= 16) {
+                for (var i=0; i<p.length; i++) { p[i] = Number(p[i]) };
+                if (p[0] > 528 || (p[0] == 528 && p[1] >= 16)) {
                     this._textRenderer = new $.jqplot.CanvasFontRenderer(ropts); 
                 }
             }
             else if ($.browser.mozilla) {
                 var p = $.browser.version.split(".");
-                if (p[0] > 1 || p[0] == 1 &&  p[1] >= 9 && p[2] > 0 ) {
+                if (p[0] > 1 || (p[0] == 1 &&  p[1] >= 9 && p[2] > 0) ) {
                     this._textRenderer = new $.jqplot.CanvasFontRenderer(ropts);
                 }
                 else {