@visactor/vrender-components 0.15.6 → 0.15.7
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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/poptip/poptip-plugin.d.ts +1 -0
- package/cjs/poptip/poptip-plugin.js +6 -3
- package/cjs/poptip/poptip-plugin.js.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/poptip/poptip-plugin.d.ts +1 -0
- package/es/poptip/poptip-plugin.js +6 -3
- package/es/poptip/poptip-plugin.js.map +1 -1
- package/package.json +3 -3
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0, exports.version = "0.15.
|
|
20
|
+
}), exports.version = void 0, exports.version = "0.15.7", __exportStar(require("./core/base"), exports),
|
|
21
21
|
__exportStar(require("./scrollbar"), exports), __exportStar(require("./tag"), exports),
|
|
22
22
|
__exportStar(require("./poptip"), exports), __exportStar(require("./crosshair"), exports),
|
|
23
23
|
__exportStar(require("./label"), exports), __exportStar(require("./axis"), exports),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.15.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.15.7\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\n"]}
|
|
@@ -20,6 +20,7 @@ export declare class PopTipForClipedTextPlugin implements IPlugin {
|
|
|
20
20
|
key: string;
|
|
21
21
|
activeGraphic: IGraphic;
|
|
22
22
|
activate(context: IPluginService): void;
|
|
23
|
+
pointerlave: (e: any) => void;
|
|
23
24
|
poptip: (e: FederatedPointerEvent) => void;
|
|
24
25
|
unpoptip: (e: FederatedPointerEvent) => void;
|
|
25
26
|
setActiveGraphic(graphic: any | null, rerender?: boolean): void;
|
|
@@ -46,7 +46,10 @@ PopTipPlugin = __decorate([ (0, inversify_1.injectable)() ], PopTipPlugin), expo
|
|
|
46
46
|
let PopTipForClipedTextPlugin = class {
|
|
47
47
|
constructor() {
|
|
48
48
|
this.name = "poptipForText", this.activeEvent = "onRegister", this._uid = vrender_1.Generator.GenAutoIncrementId(),
|
|
49
|
-
this.key = this.name + this._uid, this.
|
|
49
|
+
this.key = this.name + this._uid, this.pointerlave = e => {
|
|
50
|
+
const {stage: stage} = this.pluginService;
|
|
51
|
+
e.target === stage && this.unpoptip(e);
|
|
52
|
+
}, this.poptip = e => {
|
|
50
53
|
const graphic = e.target;
|
|
51
54
|
if ("text" !== graphic.type || !graphic.cliped || graphic.isContainer || !graphic.attribute) return void this.unpoptip(e);
|
|
52
55
|
if (graphic === this.activeGraphic) return;
|
|
@@ -61,14 +64,14 @@ let PopTipForClipedTextPlugin = class {
|
|
|
61
64
|
activate(context) {
|
|
62
65
|
this.pluginService = context;
|
|
63
66
|
const {stage: stage} = this.pluginService;
|
|
64
|
-
stage.addEventListener("pointerover", this.poptip);
|
|
67
|
+
stage.addEventListener("pointerover", this.poptip), stage.addEventListener("pointerleave", this.pointerlave);
|
|
65
68
|
}
|
|
66
69
|
setActiveGraphic(graphic, rerender) {
|
|
67
70
|
this.activeGraphic = graphic, this.pluginService.stage.renderNextFrame();
|
|
68
71
|
}
|
|
69
72
|
deactivate(context) {
|
|
70
73
|
const {stage: stage} = this.pluginService;
|
|
71
|
-
stage.removeEventListener("pointerover", this.poptip);
|
|
74
|
+
stage.removeEventListener("pointerover", this.poptip), stage.removeEventListener("pointerleave", this.pointerlave);
|
|
72
75
|
}
|
|
73
76
|
};
|
|
74
77
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/poptip/poptip-plugin.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAAuC;AAEvC,+CAA8C;AAKvC,IAAM,YAAY,GAAlB,MA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AC,aAAa,CAAC;QACrC,KAAK,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACtD,KAAK,CAAC,mBAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9D,CAAC;CACF,CAAA;AAjEY,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAiErC;AAjEY,8DAAyB","file":"poptip-plugin.js","sourcesContent":["import { injectable } from 'inversify';\nimport type { FederatedPointerEvent, IGraphic, IPlugin, IPluginService } from '@visactor/vrender';\nimport { Generator } from '@visactor/vrender';\n\n// _showPoptip: 0-没有,1-添加,2-删除\n\n@injectable()\nexport class PopTipPlugin implements IPlugin {\n name: 'poptip' = 'poptip';\n activeEvent: 'onRegister' = 'onRegister';\n pluginService: IPluginService;\n _uid: number = Generator.GenAutoIncrementId();\n key: string = this.name + this._uid;\n activeGraphic: IGraphic;\n\n activate(context: IPluginService): void {\n this.pluginService = context;\n const { stage } = this.pluginService;\n\n stage.addEventListener('pointerover', this.poptip);\n }\n poptip = (e: FederatedPointerEvent) => {\n const graphic = e.target as any;\n if (graphic.isContainer || !graphic.attribute) {\n this.unpoptip(e);\n return;\n }\n // 触发graphic重绘\n if (graphic === this.activeGraphic) {\n return;\n }\n const { poptip } = graphic.attribute;\n if (poptip) {\n graphic.setAttributes({});\n graphic._showPoptip = 1;\n }\n\n if (this.activeGraphic) {\n this.activeGraphic.setAttributes({});\n this.activeGraphic._showPoptip = 2;\n }\n // console.log(graphic)\n this.setActiveGraphic(graphic, true);\n };\n\n unpoptip = (e: FederatedPointerEvent) => {\n if (!this.activeGraphic) {\n return;\n }\n this.activeGraphic.setAttributes({});\n this.activeGraphic._showPoptip = 2;\n this.setActiveGraphic(null, true);\n };\n\n setActiveGraphic(graphic: any | null, rerender?: boolean) {\n this.activeGraphic = graphic;\n // 触发重绘\n this.pluginService.stage.renderNextFrame();\n }\n\n deactivate(context: IPluginService): void {\n const { stage } = this.pluginService;\n stage.removeEventListener('pointerover', this.poptip);\n }\n}\n\n@injectable()\nexport class PopTipForClipedTextPlugin implements IPlugin {\n name: 'poptipForText' = 'poptipForText';\n activeEvent: 'onRegister' = 'onRegister';\n pluginService: IPluginService;\n _uid: number = Generator.GenAutoIncrementId();\n key: string = this.name + this._uid;\n activeGraphic: IGraphic;\n\n activate(context: IPluginService): void {\n this.pluginService = context;\n const { stage } = this.pluginService;\n\n stage.addEventListener('pointerover', this.poptip);\n stage.addEventListener('pointerleave', this.pointerlave);\n }\n pointerlave = (e: any) => {\n const { stage } = this.pluginService;\n if (e.target === stage) {\n this.unpoptip(e);\n }\n };\n poptip = (e: FederatedPointerEvent) => {\n const graphic = e.target as any;\n if (graphic.type !== 'text' || !graphic.cliped || graphic.isContainer || !graphic.attribute) {\n this.unpoptip(e);\n return;\n }\n // 触发graphic重绘\n if (graphic === this.activeGraphic) {\n return;\n }\n const { poptip = {} } = graphic.attribute;\n if (poptip) {\n graphic.setAttributes({});\n graphic._showPoptip = 1;\n }\n // 添加默认poptip\n if (this.activeGraphic) {\n this.activeGraphic.setAttributes({});\n this.activeGraphic._showPoptip = 2;\n }\n // console.log(graphic)\n this.setActiveGraphic(graphic, true);\n };\n\n unpoptip = (e: FederatedPointerEvent) => {\n if (!this.activeGraphic) {\n return;\n }\n this.activeGraphic.setAttributes({});\n this.activeGraphic._showPoptip = 2;\n this.setActiveGraphic(null, true);\n };\n\n setActiveGraphic(graphic: any | null, rerender?: boolean) {\n this.activeGraphic = graphic;\n // 触发重绘\n this.pluginService.stage.renderNextFrame();\n }\n\n deactivate(context: IPluginService): void {\n const { stage } = this.pluginService;\n stage.removeEventListener('pointerover', this.poptip);\n stage.removeEventListener('pointerleave', this.pointerlave);\n }\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1052,6 +1052,12 @@
|
|
|
1052
1052
|
this.activeEvent = 'onRegister';
|
|
1053
1053
|
this._uid = vrender.Generator.GenAutoIncrementId();
|
|
1054
1054
|
this.key = this.name + this._uid;
|
|
1055
|
+
this.pointerlave = (e) => {
|
|
1056
|
+
const { stage } = this.pluginService;
|
|
1057
|
+
if (e.target === stage) {
|
|
1058
|
+
this.unpoptip(e);
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1055
1061
|
this.poptip = (e) => {
|
|
1056
1062
|
const graphic = e.target;
|
|
1057
1063
|
if (graphic.type !== 'text' || !graphic.cliped || graphic.isContainer || !graphic.attribute) {
|
|
@@ -1085,6 +1091,7 @@
|
|
|
1085
1091
|
this.pluginService = context;
|
|
1086
1092
|
const { stage } = this.pluginService;
|
|
1087
1093
|
stage.addEventListener('pointerover', this.poptip);
|
|
1094
|
+
stage.addEventListener('pointerleave', this.pointerlave);
|
|
1088
1095
|
}
|
|
1089
1096
|
setActiveGraphic(graphic, rerender) {
|
|
1090
1097
|
this.activeGraphic = graphic;
|
|
@@ -1093,6 +1100,7 @@
|
|
|
1093
1100
|
deactivate(context) {
|
|
1094
1101
|
const { stage } = this.pluginService;
|
|
1095
1102
|
stage.removeEventListener('pointerover', this.poptip);
|
|
1103
|
+
stage.removeEventListener('pointerleave', this.pointerlave);
|
|
1096
1104
|
}
|
|
1097
1105
|
};
|
|
1098
1106
|
PopTipForClipedTextPlugin = __decorate([
|
|
@@ -10528,7 +10536,7 @@
|
|
|
10528
10536
|
return new Tag(params ? params.attribute : {});
|
|
10529
10537
|
}
|
|
10530
10538
|
|
|
10531
|
-
const version = "0.15.
|
|
10539
|
+
const version = "0.15.7";
|
|
10532
10540
|
|
|
10533
10541
|
exports.AbstractComponent = AbstractComponent;
|
|
10534
10542
|
exports.ArcInfo = ArcInfo;
|