Skip to content
Extraits de code Groupes Projets
Valider b8b2f439 rédigé par benakamoorthi's avatar benakamoorthi
Parcourir les fichiers

Fixes #3188, move workaround to default theme's common.js file.

git-svn-id: http://dev.piwik.org/svn/trunk@6570 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent fff63dbd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -78,8 +78,6 @@ class Piwik_CoreHome extends Piwik_Plugin
$jsFiles[] = "plugins/CoreHome/templates/jqplot.js";
$jsFiles[] = "libs/jqplot/jqplot-custom.min.js";
$jsFiles[] = "plugins/CoreHome/templates/workarounds.js";
}
}
/*!
* Piwik - Web Analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
(function($){
// monkey patch that works around bug in some arc function of some browsers where
// nothing gets drawn if angles are exactly 2 * PI apart.
// affects some versions of chrome & IE 8
var oldArc = CanvasRenderingContext2D.prototype.arc;
CanvasRenderingContext2D.prototype.arc = function(x, y, r, sAngle, eAngle, clockwise) {
if (Math.abs(sAngle - eAngle) === Math.PI * 2)
eAngle -= 0.000001;
oldArc.call(this, x, y, r, sAngle, eAngle, clockwise);
};
}(jQuery));
......@@ -337,3 +337,20 @@ function isEnterKey(e)
{
return (window.event?window.event.keyCode:e.which)==13;
}
// workarounds
(function($){
try { // this code is not vital, so we make sure any errors are ignored
// monkey patch that works around bug in arc function of some browsers where
// nothing gets drawn if angles are exactly 2 * PI apart.
// affects some versions of chrome & IE 8
var oldArc = CanvasRenderingContext2D.prototype.arc;
CanvasRenderingContext2D.prototype.arc = function(x, y, r, sAngle, eAngle, clockwise) {
if (Math.abs(sAngle - eAngle) === Math.PI * 2)
eAngle -= 0.000001;
oldArc.call(this, x, y, r, sAngle, eAngle, clockwise);
};
} catch (e) {}
}(jQuery));
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter