Comparing version 3.0.0 to 3.0.1
{ | ||
"name": "zrender", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A lightweight canvas library.", | ||
@@ -27,2 +27,3 @@ "keywords": [ | ||
}, | ||
"license": "BSD", | ||
"main": "build/zrender.min.js", | ||
@@ -29,0 +30,0 @@ "files": [ |
@@ -147,3 +147,7 @@ define(function (require) { | ||
if (Math.abs(startAngle - endAngle) % PI2 < 1e-4) { | ||
var diff = Math.abs(startAngle - endAngle); | ||
if (diff < 1e-4) { | ||
return 0; | ||
} | ||
if (diff % PI2 < 1e-4) { | ||
// Is a circle | ||
@@ -150,0 +154,0 @@ startAngle = 0; |
@@ -169,3 +169,6 @@ /** | ||
if (Math.abs(startAngle - endAngle) % PI2 < 1e-4) { | ||
var diff = Math.abs(startAngle - endAngle); | ||
if (diff % PI2 < 1e-4 && diff > 1e-4) { | ||
// Is a circle | ||
@@ -172,0 +175,0 @@ min[0] = x - rx; |
@@ -18,3 +18,3 @@ /** | ||
canvasSupported: true | ||
} | ||
}; | ||
} | ||
@@ -88,3 +88,6 @@ // Zepto.js | ||
// canvasSupported : !(browser.ie && parseFloat(browser.version) < 9) | ||
canvasSupported : document.createElement('canvas').getContext ? true : false | ||
canvasSupported : document.createElement('canvas').getContext ? true : false, | ||
// @see <http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript> | ||
touchEventsSupported: 'ontouchstart' in window // works on most browsers | ||
|| navigator.maxTouchPoints // works on IE10/11 and Surface | ||
}; | ||
@@ -91,0 +94,0 @@ } |
@@ -56,13 +56,12 @@ /** | ||
/** | ||
* @param {Object=} target | ||
* @param {Object=} source | ||
* @param {*} target | ||
* @param {*} source | ||
* @param {boolean} [overwrite=false] | ||
*/ | ||
function merge(target, source, overwrite) { | ||
if (!target) { // Might be null/undefined | ||
return; | ||
// We should escapse that source is string | ||
// and enter for ... in ... | ||
if (!isObject(source) || !isObject(target)) { | ||
return overwrite ? clone(source) : target; | ||
} | ||
if (!source) { // Might be null/undefined | ||
return target; | ||
} | ||
@@ -69,0 +68,0 @@ for (var key in source) { |
@@ -37,3 +37,3 @@ /** | ||
var y = shape.cy; | ||
var r = shape.r; | ||
var r = Math.max(shape.r, 0); | ||
var startAngle = shape.startAngle; | ||
@@ -40,0 +40,0 @@ var endAngle = shape.endAngle; |
@@ -32,6 +32,6 @@ /** | ||
var x = shape.cx; // 圆心x | ||
var y = shape.cy; // 圆心y | ||
var r0 = shape.r0 || 0; // 形内半径[0,r) | ||
var r = shape.r; // 扇形外半径(0,r] | ||
var x = shape.cx; | ||
var y = shape.cy; | ||
var r0 = Math.max(shape.r0 || 0, 0); | ||
var r = Math.max(shape.r, 0); | ||
var startAngle = shape.startAngle; | ||
@@ -38,0 +38,0 @@ var endAngle = shape.endAngle; |
@@ -273,3 +273,5 @@ /** | ||
if (env.os.tablet || env.os.phone) { | ||
// @see #2350, some windows tablet (like lenovo X240) enable touch but can | ||
// use IE10, which not supports touch events. | ||
if (env.touchEventsSupported) { | ||
// mobile支持 | ||
@@ -276,0 +278,0 @@ // mobile的click/move/up/down自己模拟 |
@@ -31,3 +31,3 @@ /*! | ||
*/ | ||
zrender.version = '3.0.0'; | ||
zrender.version = '3.0.1'; | ||
@@ -34,0 +34,0 @@ /** |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1877901
47254
14
1