Comparing version 4.0.3 to 4.0.4
@@ -149,6 +149,7 @@ /** | ||
* @param {string} [opt.outputPath] Absolute output path. | ||
* @param {string} [opt.preamble] | ||
* @param {Function} [opt.transform] | ||
* @param {Function} [opt.reserveDEV] | ||
*/ | ||
exports.prePulishSrc = function ({inputPath, outputPath, transform, reserveDEV}) { | ||
exports.prePulishSrc = function ({inputPath, outputPath, preamble, transform, reserveDEV}) { | ||
assert(inputPath && outputPath); | ||
@@ -177,2 +178,6 @@ | ||
if (preamble) { | ||
code = preamble + code; | ||
} | ||
fsExtra.ensureFileSync(outputPath); | ||
@@ -179,0 +184,0 @@ fs.writeFileSync(outputPath, code, {encoding:'utf-8'}); |
@@ -18,6 +18,7 @@ function windingLine(x0, y0, x1, y1, x, y) { | ||
var x_ = t * (x1 - x0) + x0; | ||
return x_ > x ? dir : 0; | ||
var x_ = t * (x1 - x0) + x0; // If (x, y) on the line, considered as "contain". | ||
return x_ === x ? Infinity : x_ > x ? dir : 0; | ||
} | ||
module.exports = windingLine; |
@@ -10,3 +10,3 @@ /** | ||
if (typeof wx !== 'undefined') { | ||
if (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') { | ||
// In Weixin Application | ||
@@ -13,0 +13,0 @@ env = { |
@@ -86,3 +86,3 @@ var _util = require("../core/util"); | ||
for (var i = this._cursor; i < this._displayables.length; i++) { | ||
var displayable = this._temporaryDisplayables[i]; | ||
var displayable = this._displayables[i]; | ||
displayable.beforeBrush && displayable.beforeBrush(ctx); | ||
@@ -89,0 +89,0 @@ displayable.brush(ctx, i === this._cursor ? null : this._displayables[i - 1]); |
@@ -195,3 +195,4 @@ var _config = require("./config"); | ||
layers[CANVAS_ZLEVEL] = mainLayer; // Not use common zlevel. | ||
layers[CANVAS_ZLEVEL] = mainLayer; | ||
mainLayer.zlevel = CANVAS_ZLEVEL; // Not use common zlevel. | ||
@@ -198,0 +199,0 @@ zlevelList.push(CANVAS_ZLEVEL); |
@@ -9,2 +9,4 @@ var _core = require("./core"); | ||
var matrix = require("../core/matrix"); | ||
var textContain = require("../contain/text"); | ||
@@ -57,2 +59,6 @@ | ||
// Don't set attribute for gradient, since it need new dom nodes | ||
if (typeof val === 'string' && val.indexOf('NaN') > -1) { | ||
console.log(val); | ||
} | ||
el.setAttribute(key, val); | ||
@@ -408,4 +414,7 @@ } | ||
var rotate = -style.textRotation * 180 / Math.PI; | ||
attr(textSvgEl, 'transform', 'rotate(' + rotate + ',' + x + ',' + y + ')'); | ||
var rotate = -style.textRotation || 0; | ||
var transform = matrix.create(); // Apply textRotate to element matrix | ||
matrix.rotate(transform, el.transform, rotate); | ||
setTransform(textSvgEl, transform); | ||
} | ||
@@ -412,0 +421,0 @@ |
@@ -36,3 +36,3 @@ var guid = require("./core/guid"); | ||
var version = '4.0.3'; | ||
var version = '4.0.4'; | ||
/** | ||
@@ -39,0 +39,0 @@ * Initializing a zrender instance |
{ | ||
"name": "zrender", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"description": "A lightweight canvas library.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -20,3 +20,4 @@ | ||
return x_ > x ? dir : 0; | ||
// If (x, y) on the line, considered as "contain". | ||
return x_ === x ? Infinity : x_ > x ? dir : 0; | ||
} |
@@ -11,3 +11,3 @@ /** | ||
if (typeof wx !== 'undefined') { | ||
if (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') { | ||
// In Weixin Application | ||
@@ -14,0 +14,0 @@ env = { |
@@ -84,3 +84,3 @@ /** | ||
for (var i = this._cursor; i < this._displayables.length; i++) { | ||
var displayable = this._temporaryDisplayables[i]; | ||
var displayable = this._displayables[i]; | ||
displayable.beforeBrush && displayable.beforeBrush(ctx); | ||
@@ -87,0 +87,0 @@ displayable.brush(ctx, i === this._cursor ? null : this._displayables[i - 1]); |
@@ -204,2 +204,3 @@ import {devicePixelRatio} from './config'; | ||
layers[CANVAS_ZLEVEL] = mainLayer; | ||
mainLayer.zlevel = CANVAS_ZLEVEL; | ||
// Not use common zlevel. | ||
@@ -206,0 +207,0 @@ zlevelList.push(CANVAS_ZLEVEL); |
@@ -8,2 +8,3 @@ // TODO | ||
import BoundingRect from '../core/BoundingRect'; | ||
import * as matrix from '../core/matrix'; | ||
import * as textContain from '../contain/text'; | ||
@@ -53,2 +54,5 @@ import * as textHelper from '../graphic/helper/text'; | ||
// Don't set attribute for gradient, since it need new dom nodes | ||
if (typeof val === 'string' && val.indexOf('NaN') > -1) { | ||
console.log(val); | ||
} | ||
el.setAttribute(key, val); | ||
@@ -432,5 +436,7 @@ } | ||
} | ||
var rotate = -style.textRotation * 180 / Math.PI; | ||
attr(textSvgEl, 'transform', 'rotate(' + rotate + ',' | ||
+ x + ',' + y + ')'); | ||
var rotate = -style.textRotation || 0; | ||
var transform = matrix.create(); | ||
// Apply textRotate to element matrix | ||
matrix.rotate(transform, el.transform, rotate); | ||
setTransform(textSvgEl, transform); | ||
} | ||
@@ -437,0 +443,0 @@ |
@@ -31,3 +31,3 @@ /*! | ||
*/ | ||
export var version = '4.0.3'; | ||
export var version = '4.0.4'; | ||
@@ -240,3 +240,2 @@ /** | ||
// var end = new Date(); | ||
// var log = document.getElementById('log'); | ||
@@ -243,0 +242,0 @@ // if (log) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
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
3087173
61966
1