Browse Source

Add strict equalities in src/display/canvas.js

Jonas Jenwald 11 years ago
parent
commit
c1f1f2f0e1
  1. 4
      src/display/canvas.js

4
src/display/canvas.js

@ -1227,7 +1227,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
// the current transformation matrix before the fillText/strokeText. // the current transformation matrix before the fillText/strokeText.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=726227 // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227
var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE; var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE;
this.current.fontSizeScale = browserFontSize != MIN_FONT_SIZE ? 1.0 : this.current.fontSizeScale = browserFontSize !== MIN_FONT_SIZE ? 1.0 :
size / MIN_FONT_SIZE; size / MIN_FONT_SIZE;
var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface; var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface;
@ -1373,7 +1373,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
lineWidth /= scale; lineWidth /= scale;
} }
if (fontSizeScale != 1.0) { if (fontSizeScale !== 1.0) {
ctx.scale(fontSizeScale, fontSizeScale); ctx.scale(fontSizeScale, fontSizeScale);
lineWidth /= fontSizeScale; lineWidth /= fontSizeScale;
} }

Loading…
Cancel
Save