zrender-nightly 5.6.1-dev.20240628 → 5.6.1-dev.20240630
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zrender.js +5 -4
- package/dist/zrender.js.map +1 -1
- package/dist/zrender.min.js +1 -1
- package/lib/svg/Painter.js +1 -0
- package/lib/svg/core.d.ts +1 -0
- package/lib/svg/graphic.js +3 -3
- package/lib/zrender.d.ts +1 -1
- package/lib/zrender.js +1 -1
- package/package.json +1 -1
- package/src/svg/Painter.ts +1 -0
- package/src/svg/core.ts +2 -0
- package/src/svg/graphic.ts +6 -4
- package/src/zrender.ts +1 -1
package/lib/svg/Painter.js
CHANGED
@@ -66,6 +66,7 @@ var SVGPainter = (function () {
|
|
66
66
|
scope.willUpdate = opts.willUpdate;
|
67
67
|
scope.compress = opts.compress;
|
68
68
|
scope.emphasis = opts.emphasis;
|
69
|
+
scope.ssr = this._opts.ssr;
|
69
70
|
var children = [];
|
70
71
|
var bgVNode = this._bgVNode = createBackgroundVNode(width, height, this._backgroundColor, scope);
|
71
72
|
bgVNode && children.push(bgVNode);
|
package/lib/svg/core.d.ts
CHANGED
@@ -41,6 +41,7 @@ export interface BrushScope {
|
|
41
41
|
emphasis?: boolean;
|
42
42
|
willUpdate?: boolean;
|
43
43
|
compress?: boolean;
|
44
|
+
ssr?: boolean;
|
44
45
|
}
|
45
46
|
export declare function createBrushScope(zrId: string): BrushScope;
|
46
47
|
export declare function createSVGVNode(width: number | string, height: number | string, children?: SVGVNode[], useViewBox?: boolean): SVGVNode;
|
package/lib/svg/graphic.js
CHANGED
@@ -29,12 +29,12 @@ function setStyleAttrs(attrs, style, el, scope) {
|
|
29
29
|
else if (isFillStroke && isPattern(val)) {
|
30
30
|
setPattern(el, attrs, key, scope);
|
31
31
|
}
|
32
|
-
else if (isFillStroke && val === 'none') {
|
33
|
-
attrs[key] = 'transparent';
|
34
|
-
}
|
35
32
|
else {
|
36
33
|
attrs[key] = val;
|
37
34
|
}
|
35
|
+
if (isFillStroke && scope.ssr && val === 'none') {
|
36
|
+
attrs['pointer-events'] = 'visible';
|
37
|
+
}
|
38
38
|
}, style, el, false);
|
39
39
|
setShadow(el, attrs, scope);
|
40
40
|
}
|
package/lib/zrender.d.ts
CHANGED
@@ -90,7 +90,7 @@ export declare type ElementSSRData = zrUtil.HashMap<unknown>;
|
|
90
90
|
export declare type ElementSSRDataGetter<T> = (el: Element) => zrUtil.HashMap<T>;
|
91
91
|
export declare function getElementSSRData(el: Element): ElementSSRData;
|
92
92
|
export declare function registerSSRDataGetter<T>(getter: ElementSSRDataGetter<T>): void;
|
93
|
-
export declare const version = "5.6.1-dev.
|
93
|
+
export declare const version = "5.6.1-dev.20240630";
|
94
94
|
export interface ZRenderType extends ZRender {
|
95
95
|
}
|
96
96
|
export {};
|
package/lib/zrender.js
CHANGED
package/package.json
CHANGED
package/src/svg/Painter.ts
CHANGED
package/src/svg/core.ts
CHANGED
package/src/svg/graphic.ts
CHANGED
@@ -63,13 +63,15 @@ function setStyleAttrs(attrs: SVGVNodeAttrs, style: AllStyleOption, el: Path | T
|
|
63
63
|
else if (isFillStroke && isPattern(val)) {
|
64
64
|
setPattern(el, attrs, key, scope);
|
65
65
|
}
|
66
|
-
else if (isFillStroke && val === 'none') {
|
67
|
-
// When is none, it cannot be interacted when ssr
|
68
|
-
attrs[key] = 'transparent';
|
69
|
-
}
|
70
66
|
else {
|
71
67
|
attrs[key] = val;
|
72
68
|
}
|
69
|
+
if (isFillStroke && scope.ssr && val === 'none') {
|
70
|
+
// When is none, it cannot be interacted when ssr
|
71
|
+
// Setting `pointer-events` as `visible` to make it responding
|
72
|
+
// See also https://www.w3.org/TR/SVG/interact.html#PointerEventsProperty
|
73
|
+
attrs['pointer-events'] = 'visible';
|
74
|
+
}
|
73
75
|
}, style, el, false);
|
74
76
|
|
75
77
|
setShadow(el, attrs, scope);
|
package/src/zrender.ts
CHANGED
@@ -556,7 +556,7 @@ export function registerSSRDataGetter<T>(getter: ElementSSRDataGetter<T>) {
|
|
556
556
|
/**
|
557
557
|
* @type {string}
|
558
558
|
*/
|
559
|
-
export const version = '5.6.1-dev.
|
559
|
+
export const version = '5.6.1-dev.20240630';
|
560
560
|
|
561
561
|
|
562
562
|
export interface ZRenderType extends ZRender {};
|