Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Tips Plugin: backingStoreRatio fix
Browse files Browse the repository at this point in the history
fixed the backingStoreRatio for Mozialla, MS and others
  • Loading branch information
pYr0x committed Sep 4, 2013
1 parent 9f8c8ba commit 2b5520d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tips/tips.js
Expand Up @@ -272,7 +272,7 @@ $.extend(Tip.prototype, {
mimic = options.mimic,
round = Math.round,
color, precedance, context, scale, scaledSize,
coords, bigCoords, translate, newSize, border;
coords, bigCoords, translate, newSize, border, backingStoreRatio;

// Re-determine tip if not already set
if(!corner) { corner = this.qtip.cache.corner || this.corner; }
Expand Down Expand Up @@ -343,8 +343,9 @@ $.extend(Tip.prototype, {
context = inner[0].getContext('2d');
context.restore(); context.save();
context.clearRect(0,0,6000,6000);

scale = PIXEL_RATIO / context.webkitBackingStorePixelRatio;

backingStoreRatio = context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;
scale = PIXEL_RATIO / backingStoreRatio;

// Calculate coordinates
coords = this._calculateTip(mimic, curSize, scale);
Expand Down

0 comments on commit 2b5520d

Please sign in to comment.