Socket
Socket
Sign inDemoInstall

zrender

Package Overview
Dependencies
Maintainers
11
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zrender - npm Package Compare versions

Comparing version 5.2.0 to 5.2.1

.github/workflows/nightly-next.yaml

44

build/prepareNightly.js

@@ -5,24 +5,34 @@ const fs = require('fs');

const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
const version = packageJson.version;
const parts = /(\d+)\.(\d+)\.(\d+)($|\-)/.exec(version);
if (!parts) {
throw new Error(`Invalid version number ${version}`);
function updateVersion(version) {
const isNext = process.argv.includes('--next');
const parts = /(\d+)\.(\d+)\.(\d+)($|\-)/.exec(version);
if (!parts) {
throw new Error(`Invalid version number ${version}`);
}
// Add date to version.
const major = +parts[1];
let minor = +parts[2];
let patch = +parts[3];
const isStable = !parts[4];
if (isStable) {
// It's previous stable version. Dev version should be higher.
if (isNext) {
// Increase minor version for next branch.
minor++;
}
else {
// Increase main version for master branch.
patch++;
}
}
const date = new Date().toISOString().replace(/:|T|\.|-/g, '').slice(0, 8);
return `${major}.${minor}.${patch}-dev.${date}`;
}
// Add date to version.
const major = +parts[1];
const minor = +parts[2];
let patch = +parts[3];
const isStable = !parts[4];
if (isStable) {
// It's previous stable version. Dev version should be higher.
patch++;
}
const date = new Date().toISOString().replace(/:|T|\.|-/g, '').slice(0, 8);
const nightlyVersion = `${major}.${minor}.${patch}-dev.${date}`;
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
packageJson.name = nightlyPackageName;
packageJson.version = nightlyVersion;
packageJson.version = updateVersion(packageJson.version);
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');

@@ -12,3 +12,3 @@ import { DEFAULT_COMMON_STYLE } from '../graphic/Displayable';

import IncrementalDisplayable from '../graphic/IncrementalDisplayable';
import { REDARAW_BIT, SHAPE_CHANGED_BIT } from '../graphic/constants';
import { REDRAW_BIT, SHAPE_CHANGED_BIT } from '../graphic/constants';
var pathProxyForDraw = new PathProxy(true);

@@ -448,3 +448,3 @@ function styleHasStroke(style) {

if (!el.shouldBePainted(scope.viewWidth, scope.viewHeight, false, false)) {
el.__dirty &= ~REDARAW_BIT;
el.__dirty &= ~REDRAW_BIT;
el.__isRendered = false;

@@ -451,0 +451,0 @@ return;

@@ -8,3 +8,3 @@ import { __extends } from "tslib";

import BoundingRect from '../core/BoundingRect';
import { REDARAW_BIT } from '../graphic/constants';
import { REDRAW_BIT } from '../graphic/constants';
function returnFalse() {

@@ -165,3 +165,3 @@ return false;

var shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true);
var prevRect = el.__isRendered && ((el.__dirty & REDARAW_BIT) || !shouldPaint)
var prevRect = el.__isRendered && ((el.__dirty & REDRAW_BIT) || !shouldPaint)
? el.getPrevPaintRect()

@@ -172,3 +172,3 @@ : null;

}
var curRect = shouldPaint && ((el.__dirty & REDARAW_BIT) || !el.__isRendered)
var curRect = shouldPaint && ((el.__dirty & REDRAW_BIT) || !el.__isRendered)
? el.getPaintRect()

@@ -175,0 +175,0 @@ : null;

@@ -8,3 +8,3 @@ import { devicePixelRatio } from '../config';

import { brush, brushSingle } from './graphic';
import { REDARAW_BIT } from '../graphic/constants';
import { REDRAW_BIT } from '../graphic/constants';
var HOVER_LAYER_ZLEVEL = 1e5;

@@ -490,3 +490,3 @@ var CANVAS_ZLEVEL = 314159;

}
if ((el.__dirty & REDARAW_BIT) && !el.__inHover) {
if ((el.__dirty & REDRAW_BIT) && !el.__inHover) {
layer.__dirty = true;

@@ -493,0 +493,0 @@ if (layer.incremental && layer.__drawIndex < 0) {

@@ -1,5 +0,5 @@

import Element, { ElementOption } from '../Element';
import Element, { ElementProps } from '../Element';
import BoundingRect from '../core/BoundingRect';
import Storage from '../Storage';
export interface GroupOption extends ElementOption {
export interface GroupOption extends ElementProps {
}

@@ -12,3 +12,3 @@ export default class Group extends Element {

constructor(opts?: GroupOption);
children(): Element<ElementOption>[];
children(): Element<ElementProps>[];
childAt(idx: number): Element;

@@ -15,0 +15,0 @@ childOfName(name: string): Element;

@@ -13,2 +13,3 @@ import Eventful from './Eventful';

else if (env.browser.firefox
&& env.browser.version < '39'
&& e.layerX != null

@@ -15,0 +16,0 @@ && e.layerX !== e.offsetX) {

@@ -30,2 +30,3 @@ var BUILTIN_OBJECT = {

var protoFunction = ctorFunction ? ctorFunction.prototype : null;
var protoKey = '__proto__';
var methods = {};

@@ -79,3 +80,3 @@ export function $override(name, fn) {

for (var key in source) {
if (source.hasOwnProperty(key)) {
if (source.hasOwnProperty(key) && key !== protoKey) {
result[key] = clone(source[key]);

@@ -92,3 +93,3 @@ }

for (var key in source) {
if (source.hasOwnProperty(key)) {
if (source.hasOwnProperty(key) && key !== protoKey) {
var targetProp = target[key];

@@ -128,3 +129,3 @@ var sourceProp = source[key];

for (var key in source) {
if (source.hasOwnProperty(key)) {
if (source.hasOwnProperty(key) && key !== protoKey) {
target[key] = source[key];

@@ -131,0 +132,0 @@ }

@@ -10,3 +10,3 @@ import Transformable from './core/Transformable';

import env from './core/env';
import { REDARAW_BIT } from './graphic/constants';
import { REDRAW_BIT } from './graphic/constants';
export var PRESERVED_NORMAL_STATE = '__zr_normal__';

@@ -171,3 +171,3 @@ var PRIMARY_STATES_KEYS = ['x', 'y', 'scaleX', 'scaleY', 'originX', 'originY', 'rotation', 'ignore'];

}
textEl.__dirty |= REDARAW_BIT;
textEl.__dirty |= REDRAW_BIT;
if (textStyleChanged) {

@@ -349,3 +349,3 @@ textEl.dirtyStyle(true);

this._toggleHoverLayerFlag(false);
this.__dirty &= ~REDARAW_BIT;
this.__dirty &= ~REDRAW_BIT;
}

@@ -409,3 +409,3 @@ return state;

this._toggleHoverLayerFlag(false);
this.__dirty &= ~REDARAW_BIT;
this.__dirty &= ~REDRAW_BIT;
}

@@ -621,3 +621,3 @@ }

Element.prototype.markRedraw = function () {
this.__dirty |= REDARAW_BIT;
this.__dirty |= REDRAW_BIT;
var zr = this.__zr;

@@ -771,3 +771,3 @@ if (zr) {

elProto.__inHover = false;
elProto.__dirty = REDARAW_BIT;
elProto.__dirty = REDRAW_BIT;
var logs = {};

@@ -774,0 +774,0 @@ function logDeprecatedError(key, xKey, yKey) {

@@ -10,2 +10,3 @@ import * as zrUtil from './core/util';

export { default as Element, ElementAnimateConfig, ElementTextConfig, ElementTextGuideLineConfig, ElementEvent, ElementEventCallback, ElementProps } from './Element';
export { default as Displayable, DisplayableProps } from './graphic/Displayable';
export { default as Group, GroupProps } from './graphic/Group';

@@ -12,0 +13,0 @@ export { default as Path, PathStyleProps, PathProps, PathStatePropNames, PathState } from './graphic/Path';

@@ -10,2 +10,3 @@ import * as zrUtil from './core/util';

export { default as Element } from './Element';
export { default as Displayable } from './graphic/Displayable';
export { default as Group } from './graphic/Group';

@@ -12,0 +13,0 @@ export { default as Path } from './graphic/Path';

@@ -1,3 +0,3 @@

export declare const REDARAW_BIT = 1;
export declare const REDRAW_BIT = 1;
export declare const STYLE_CHANGED_BIT = 2;
export declare const SHAPE_CHANGED_BIT = 4;

@@ -1,3 +0,3 @@

export var REDARAW_BIT = 1;
export var REDRAW_BIT = 1;
export var STYLE_CHANGED_BIT = 2;
export var SHAPE_CHANGED_BIT = 4;

@@ -5,3 +5,3 @@ import { __extends } from "tslib";

import { keys, extend, createObject } from '../core/util';
import { REDARAW_BIT, STYLE_CHANGED_BIT } from './constants';
import { REDRAW_BIT, STYLE_CHANGED_BIT } from './constants';
var STYLE_MAGIC_KEY = '__zr_style_' + Math.round((Math.random() * 10));

@@ -310,3 +310,3 @@ export var DEFAULT_COMMON_STYLE = {

dispProto.dirtyRectTolerance = 0;
dispProto.__dirty = REDARAW_BIT | STYLE_CHANGED_BIT;
dispProto.__dirty = REDRAW_BIT | STYLE_CHANGED_BIT;
})();

@@ -313,0 +313,0 @@ return Displayable;

@@ -5,3 +5,3 @@ export interface GradientObject {

colorStops: GradientColorStop[];
global: boolean;
global?: boolean;
}

@@ -8,0 +8,0 @@ export interface InnerGradientObject extends GradientObject {

@@ -5,3 +5,3 @@ import { PropType } from '../../core/types';

declare type BrushType = PropType<Path, 'brush'>;
export default function (orignalBrush: BrushType): (ctx: CanvasRenderingContext2D, prevEl?: Displayable<import("../Displayable").DisplayableOption>) => void;
export default function (orignalBrush: BrushType): (ctx: CanvasRenderingContext2D, prevEl?: Displayable<import("../Displayable").DisplayableProps>) => void;
export {};
import * as textContain from '../../contain/text';
import { WILL_BE_RESTORED } from '../constant';
import { StyleOption } from '../Style';
import { StyleProps } from '../Style';
import Displayable from '../Displayable';

@@ -13,9 +13,9 @@ import { RectLike } from '../../core/BoundingRect';

};
export declare function normalizeTextStyle(style: StyleOption): StyleOption;
export declare function renderText(hostEl: Displayable, ctx: CanvasRenderingContext2D, text: string, style: StyleOption, rect: RectLike, prevEl?: Displayable | typeof WILL_BE_RESTORED): void;
export declare function getBoxPosition<T>(out: Partial<TextBoxPosition>, hostEl: Displayable<T>, style: StyleOption, rect: RectLike): Partial<TextBoxPosition>;
export declare function getStroke(stroke?: PropType<StyleOption, 'textStroke'>, lineWidth?: number): string | PatternObject | import("../LinearGradient").LinearGradientObject | import("../RadialGradient").RadialGradientObject;
export declare function getFill(fill?: PropType<StyleOption, 'textStroke'>): string | PatternObject | import("../LinearGradient").LinearGradientObject | import("../RadialGradient").RadialGradientObject;
export declare function normalizeTextStyle(style: StyleProps): StyleProps;
export declare function renderText(hostEl: Displayable, ctx: CanvasRenderingContext2D, text: string, style: StyleProps, rect: RectLike, prevEl?: Displayable | typeof WILL_BE_RESTORED): void;
export declare function getBoxPosition<T>(out: Partial<TextBoxPosition>, hostEl: Displayable<T>, style: StyleProps, rect: RectLike): Partial<TextBoxPosition>;
export declare function getStroke(stroke?: PropType<StyleProps, 'textStroke'>, lineWidth?: number): string | PatternObject | import("../LinearGradient").LinearGradientObject | import("../RadialGradient").RadialGradientObject;
export declare function getFill(fill?: PropType<StyleProps, 'textStroke'>): string | PatternObject | import("../LinearGradient").LinearGradientObject | import("../RadialGradient").RadialGradientObject;
export declare function parsePercent(value: number | string, maxValue: number): number;
export declare function needDrawText(text: string, style: StyleOption): boolean;
export declare function needDrawText(text: string, style: StyleProps): boolean;
export {};

@@ -8,3 +8,3 @@ import { __extends } from "tslib";

import { DARK_LABEL_COLOR, LIGHT_LABEL_COLOR, DARK_MODE_THRESHOLD, LIGHTER_LABEL_COLOR } from '../config';
import { REDARAW_BIT, SHAPE_CHANGED_BIT, STYLE_CHANGED_BIT } from './constants';
import { REDRAW_BIT, SHAPE_CHANGED_BIT, STYLE_CHANGED_BIT } from './constants';
export var DEFAULT_PATH_STYLE = defaults({

@@ -69,3 +69,3 @@ fill: '#000',

}
decalEl.__dirty |= REDARAW_BIT;
decalEl.__dirty |= REDRAW_BIT;
}

@@ -396,3 +396,3 @@ else if (this._decalEl) {

pathProto.autoBatch = false;
pathProto.__dirty = REDARAW_BIT | STYLE_CHANGED_BIT | SHAPE_CHANGED_BIT;
pathProto.__dirty = REDRAW_BIT | STYLE_CHANGED_BIT | SHAPE_CHANGED_BIT;
})();

@@ -399,0 +399,0 @@ return Path;

@@ -9,3 +9,3 @@ import { RectLike } from '../core/BoundingRect';

import { GradientObject } from './Gradient';
export declare class TextStyleOption {
export declare class TextStyleProps {
text?: string;

@@ -17,4 +17,4 @@ textFill?: string | PatternObject | LinearGradientObject | RadialGradientObject;

textFont?: string;
fontStyle?: string;
fontWeight?: string;
fontStyle?: 'normal' | 'italic' | 'oblique';
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number;
fontFamily?: string;

@@ -45,3 +45,3 @@ fontSize?: number;

}
export declare class StyleOption extends TextStyleOption {
export declare class StyleProps extends TextStyleProps {
x?: number;

@@ -74,3 +74,3 @@ y?: number;

textPadding?: number | number[];
rich?: Dictionary<TextStyleOption>;
rich?: Dictionary<TextStyleProps>;
truncate?: {

@@ -85,11 +85,11 @@ outerWidth?: number;

}
declare type StyleKey = keyof StyleOption;
declare type StyleValueType = PropType<StyleOption, StyleKey>;
export default class Style extends StyleOption {
constructor(opts?: StyleOption);
declare type StyleKey = keyof StyleProps;
declare type StyleValueType = PropType<StyleProps, StyleKey>;
export default class Style extends StyleProps {
constructor(opts?: StyleProps);
bind(ctx: CanvasRenderingContext2D, el: Displayable, prevEl: Displayable): void;
hasFill(): boolean;
hasStroke(): boolean;
extendFrom(otherStyle: StyleOption, overwrite?: boolean): void;
set(obj: StyleOption | StyleKey, value?: StyleValueType): void;
extendFrom(otherStyle: StyleProps, overwrite?: boolean): void;
set(obj: StyleProps | StyleKey, value?: StyleValueType): void;
clone(): Style;

@@ -96,0 +96,0 @@ static getGradient(ctx: CanvasRenderingContext2D, obj: GradientObject, rect: RectLike): CanvasGradient;

@@ -43,16 +43,16 @@ "use strict";

}
var TextStyleOption = (function () {
function TextStyleOption() {
var TextStyleProps = (function () {
function TextStyleProps() {
}
return TextStyleOption;
return TextStyleProps;
}());
exports.TextStyleOption = TextStyleOption;
var StyleOption = (function (_super) {
tslib_1.__extends(StyleOption, _super);
function StyleOption() {
exports.TextStyleProps = TextStyleProps;
var StyleProps = (function (_super) {
tslib_1.__extends(StyleProps, _super);
function StyleProps() {
return _super !== null && _super.apply(this, arguments) || this;
}
return StyleOption;
}(TextStyleOption));
exports.StyleOption = StyleOption;
return StyleProps;
}(TextStyleProps));
exports.StyleProps = StyleProps;
var Style = (function (_super) {

@@ -171,5 +171,5 @@ tslib_1.__extends(Style, _super);

return Style;
}(StyleOption));
}(StyleProps));
exports["default"] = Style;
;
//# sourceMappingURL=Style.js.map
import * as util from './core/util';
import env from './core/env';
import timsort from './core/timsort';
import { REDARAW_BIT } from './graphic/constants';
import { REDRAW_BIT } from './graphic/constants';
var invalidZErrorLogged = false;

@@ -85,3 +85,3 @@ function logInvalidZError() {

if (el.__dirty) {
child.__dirty |= REDARAW_BIT;
child.__dirty |= REDRAW_BIT;
}

@@ -88,0 +88,0 @@ this._updateAndAddDisplayable(child, clipPaths, includeIgnore);

@@ -57,3 +57,3 @@ import { createElement, normalizeColor } from './core';

if (el instanceof ZRImage) {
svgEl.style.opacity = opacity + '';
attr(svgEl, 'opacity', opacity + '');
return;

@@ -99,3 +99,3 @@ }

else {
attr(svgEl, 'stroke-dasharray', '');
attr(svgEl, 'stroke-dasharray', NONE);
}

@@ -102,0 +102,0 @@ style.lineCap && attr(svgEl, 'stroke-linecap', style.lineCap);

@@ -41,3 +41,3 @@ import { __extends } from "tslib";

displayable._shadowDom = null;
svgElement.style.filter = '';
svgElement.removeAttribute('filter');
}

@@ -72,3 +72,3 @@ };

var id = shadowDom.getAttribute('id');
svgElement.style.filter = 'url(#' + id + ')';
svgElement.setAttribute('filter', 'url(#' + id + ')');
};

@@ -75,0 +75,0 @@ ShadowManager.prototype.removeUnused = function () {

@@ -12,3 +12,4 @@ export declare function parse(colorStr: string, rgbaArr?: number[]): number[];

};
export declare function lerp(normalizedValue: number, colors: string[], fullOutput?: boolean): string | LerpFullOutput;
export declare function lerp(normalizedValue: number, colors: string[], fullOutput: boolean): LerpFullOutput;
export declare function lerp(normalizedValue: number, colors: string[]): string;
export declare const mapToColor: typeof lerp;

@@ -15,0 +16,0 @@ export declare function modifyHSL(color: string, h?: number, s?: number, l?: number): string;

@@ -301,3 +301,3 @@ import Group from '../graphic/Group';

img.setStyle({
image: xmlNode.getAttribute('xlink:href'),
image: xmlNode.getAttribute('xlink:href') || xmlNode.getAttribute('href'),
x: +xmlNode.getAttribute('x'),

@@ -304,0 +304,0 @@ y: +xmlNode.getAttribute('y'),

@@ -91,5 +91,5 @@ /*!

export declare function registerPainter(name: string, Ctor: PainterBaseCtor): void;
export declare const version = "5.2.0";
export declare const version = "5.2.1";
export interface ZRenderType extends ZRender {
}
export {};

@@ -265,3 +265,3 @@ /*!

}
export var version = '5.2.0';
export var version = '5.2.1';
;
{
"name": "zrender",
"version": "5.2.0",
"version": "5.2.1",
"description": "A lightweight canvas library.",

@@ -18,2 +18,3 @@ "keywords": [

"prepare:nightly": "node build/prepareNightly.js",
"prepare:nightly-next": "node build/prepareNightly.js --next",
"build:bundle": "node build/build.js",

@@ -20,0 +21,0 @@ "build:lib": "npx tsc -m ES2015 --outDir lib",

@@ -18,3 +18,3 @@ import Displayable, { DEFAULT_COMMON_STYLE } from '../graphic/Displayable';

import IncrementalDisplayable from '../graphic/IncrementalDisplayable';
import { REDARAW_BIT, SHAPE_CHANGED_BIT } from '../graphic/constants';
import { REDRAW_BIT, SHAPE_CHANGED_BIT } from '../graphic/constants';

@@ -652,3 +652,3 @@ const pathProxyForDraw = new PathProxy(true);

// can not be updated in this case.
el.__dirty &= ~REDARAW_BIT;
el.__dirty &= ~REDRAW_BIT;
el.__isRendered = false;

@@ -655,0 +655,0 @@ return;

@@ -13,3 +13,3 @@ import * as util from '../core/util';

import BoundingRect from '../core/BoundingRect';
import { REDARAW_BIT } from '../graphic/constants';
import { REDRAW_BIT } from '../graphic/constants';

@@ -285,3 +285,3 @@ function returnFalse() {

const shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true);
const prevRect = el.__isRendered && ((el.__dirty & REDARAW_BIT) || !shouldPaint)
const prevRect = el.__isRendered && ((el.__dirty & REDRAW_BIT) || !shouldPaint)
? el.getPrevPaintRect()

@@ -298,3 +298,3 @@ : null;

*/
const curRect = shouldPaint && ((el.__dirty & REDARAW_BIT) || !el.__isRendered)
const curRect = shouldPaint && ((el.__dirty & REDRAW_BIT) || !el.__isRendered)
? el.getPaintRect()

@@ -301,0 +301,0 @@ : null;

@@ -17,3 +17,3 @@ import {devicePixelRatio} from '../config';

import Path from '../graphic/Path';
import { REDARAW_BIT } from '../graphic/constants';
import { REDRAW_BIT } from '../graphic/constants';

@@ -755,3 +755,3 @@ const HOVER_LAYER_ZLEVEL = 1e5;

}
if ((el.__dirty & REDARAW_BIT) && !el.__inHover) { // Ignore dirty elements in hover layer.
if ((el.__dirty & REDRAW_BIT) && !el.__inHover) { // Ignore dirty elements in hover layer.
layer.__dirty = true;

@@ -758,0 +758,0 @@ if (layer.incremental && layer.__drawIndex < 0) {

@@ -70,2 +70,5 @@ /**

else if (env.browser.firefox
// use offsetX/offsetY for Firefox >= 39
// PENDING: consider Firefox for Android and Firefox OS? >= 43
&& env.browser.version < '39'
&& (e as FirefoxMouseEvent).layerX != null

@@ -77,3 +80,3 @@ && (e as FirefoxMouseEvent).layerX !== (e as MouseEvent).offsetX

}
// For IE6+, chrome, safari, opera. (When will ff support offsetX?)
// For IE6+, chrome, safari, opera, firefox >= 39
else if ((e as MouseEvent).offsetX != null) {

@@ -80,0 +83,0 @@ out.zrX = (e as MouseEvent).offsetX;

@@ -0,1 +1,2 @@

/* global: defineProperty */
import { Dictionary, ArrayLike, KeyOfDistributive } from './types';

@@ -41,2 +42,3 @@ import { GradientObject } from '../graphic/Gradient';

const protoFunction = ctorFunction ? ctorFunction.prototype : null;
const protoKey = '__proto__';

@@ -51,2 +53,3 @@ // Avoid assign to an exported constiable, for transforming to cjs.

let idStart = 0x0907;
/**

@@ -111,3 +114,4 @@ * Generate unique id

for (let key in source) {
if (source.hasOwnProperty(key)) {
// Check if key is __proto__ to avoid prototype pollution
if (source.hasOwnProperty(key) && key !== protoKey) {
result[key] = clone(source[key]);

@@ -137,3 +141,4 @@ }

for (let key in source) {
if (source.hasOwnProperty(key)) {
// Check if key is __proto__ to avoid prototype pollution
if (source.hasOwnProperty(key) && key !== protoKey) {
const targetProp = target[key];

@@ -191,3 +196,4 @@ const sourceProp = source[key];

for (let key in source) {
if (source.hasOwnProperty(key)) {
// Check if key is __proto__ to avoid prototype pollution
if (source.hasOwnProperty(key) && key !== protoKey) {
(target as S & T)[key] = (source as T & S)[key];

@@ -194,0 +200,0 @@ }

@@ -31,3 +31,3 @@ import Transformable from './core/Transformable';

import env from './core/env';
import { REDARAW_BIT } from './graphic/constants';
import { REDRAW_BIT } from './graphic/constants';

@@ -659,3 +659,3 @@ export interface ElementAnimateConfig {

// DON'T use markRedraw. It will cause Element itself to dirty again.
textEl.__dirty |= REDARAW_BIT;
textEl.__dirty |= REDRAW_BIT;

@@ -942,3 +942,3 @@ if (textStyleChanged) {

// Only clear from hover layer.
this.__dirty &= ~REDARAW_BIT;
this.__dirty &= ~REDRAW_BIT;
}

@@ -1030,3 +1030,3 @@

// Only clear from hover layer.
this.__dirty &= ~REDARAW_BIT;
this.__dirty &= ~REDRAW_BIT;
}

@@ -1361,3 +1361,3 @@ }

markRedraw() {
this.__dirty |= REDARAW_BIT;
this.__dirty |= REDRAW_BIT;
const zr = this.__zr;

@@ -1631,3 +1631,3 @@ if (zr) {

elProto.__inHover = false;
elProto.__dirty = REDARAW_BIT;
elProto.__dirty = REDRAW_BIT;

@@ -1634,0 +1634,0 @@

@@ -26,2 +26,3 @@ /**

export {default as Displayable, DisplayableProps} from './graphic/Displayable';
export {default as Group, GroupProps} from './graphic/Group';

@@ -28,0 +29,0 @@ export {default as Path, PathStyleProps, PathProps, PathStatePropNames, PathState} from './graphic/Path';

// Bit masks to check which parts of element needs to be updated.
export const REDARAW_BIT = 1;
export const REDRAW_BIT = 1;
export const STYLE_CHANGED_BIT = 2;
export const SHAPE_CHANGED_BIT = 4;

@@ -11,3 +11,3 @@ /**

import Animator from '../animation/Animator';
import { REDARAW_BIT, STYLE_CHANGED_BIT } from './constants';
import { REDRAW_BIT, STYLE_CHANGED_BIT } from './constants';

@@ -602,3 +602,3 @@ // type CalculateTextPositionResult = ReturnType<typeof calculateTextPosition>

dispProto.__dirty = REDARAW_BIT | STYLE_CHANGED_BIT;
dispProto.__dirty = REDRAW_BIT | STYLE_CHANGED_BIT;
})()

@@ -605,0 +605,0 @@ }

@@ -10,3 +10,3 @@ // TODO Should GradientObject been LinearGradientObject | RadialGradientObject

global: boolean
global?: boolean
}

@@ -13,0 +13,0 @@

@@ -19,3 +19,3 @@ import Displayable, { DisplayableProps,

import { DARK_LABEL_COLOR, LIGHT_LABEL_COLOR, DARK_MODE_THRESHOLD, LIGHTER_LABEL_COLOR } from '../config';
import { REDARAW_BIT, SHAPE_CHANGED_BIT, STYLE_CHANGED_BIT } from './constants';
import { REDRAW_BIT, SHAPE_CHANGED_BIT, STYLE_CHANGED_BIT } from './constants';

@@ -197,3 +197,3 @@

decalEl.__dirty |= REDARAW_BIT;
decalEl.__dirty |= REDRAW_BIT;
}

@@ -675,3 +675,3 @@ else if (this._decalEl) {

pathProto.autoBatch = false;
pathProto.__dirty = REDARAW_BIT | STYLE_CHANGED_BIT | SHAPE_CHANGED_BIT;
pathProto.__dirty = REDRAW_BIT | STYLE_CHANGED_BIT | SHAPE_CHANGED_BIT;
})()

@@ -678,0 +678,0 @@ }

@@ -11,3 +11,3 @@ import * as util from './core/util';

import Path from './graphic/Path';
import { REDARAW_BIT } from './graphic/constants';
import { REDRAW_BIT } from './graphic/constants';

@@ -145,3 +145,3 @@ let invalidZErrorLogged = false;

if (el.__dirty) {
child.__dirty |= REDARAW_BIT;
child.__dirty |= REDRAW_BIT;
}

@@ -148,0 +148,0 @@

@@ -90,3 +90,3 @@ // TODO

if (el instanceof ZRImage) {
svgEl.style.opacity = opacity + '';
attr(svgEl, 'opacity', opacity + '');
return;

@@ -141,3 +141,3 @@ }

else {
attr(svgEl, 'stroke-dasharray', '');
attr(svgEl, 'stroke-dasharray', NONE);
}

@@ -144,0 +144,0 @@

@@ -76,3 +76,3 @@ /**

(displayable as DisplayableExtended)._shadowDom = null;
svgElement.style.filter = '';
svgElement.removeAttribute('filter');
}

@@ -128,3 +128,3 @@ }

const id = shadowDom.getAttribute('id');
svgElement.style.filter = 'url(#' + id + ')';
svgElement.setAttribute('filter', 'url(#' + id + ')');
}

@@ -131,0 +131,0 @@

@@ -446,2 +446,11 @@ import LRU from '../core/LRU';

colors: string[],
fullOutput: boolean
): LerpFullOutput
export function lerp(
normalizedValue: number,
colors: string[]
): string
export function lerp(
normalizedValue: number,
colors: string[],
fullOutput?: boolean

@@ -448,0 +457,0 @@ ): string | LerpFullOutput {

@@ -482,3 +482,3 @@ import Group from '../graphic/Group';

img.setStyle({
image: xmlNode.getAttribute('xlink:href'),
image: xmlNode.getAttribute('xlink:href') || xmlNode.getAttribute('href'),
x: +xmlNode.getAttribute('x'),

@@ -485,0 +485,0 @@ y: +xmlNode.getAttribute('y'),

@@ -524,5 +524,5 @@ /*!

*/
export const version = '5.2.0';
export const version = '5.2.1';
export interface ZRenderType extends ZRender {};

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc