@visactor/vrender-components 0.17.2-alpha.4 → 0.17.2

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.
@@ -68,6 +68,7 @@ export declare const DEFAULT_DATA_ZOOM_ATTRIBUTES: {
68
68
  };
69
69
  startHandlerStyle: {
70
70
  visible: boolean;
71
+ triggerMinSize: number;
71
72
  symbolType: string;
72
73
  fill: string;
73
74
  stroke: string;
@@ -75,6 +76,7 @@ export declare const DEFAULT_DATA_ZOOM_ATTRIBUTES: {
75
76
  };
76
77
  endHandlerStyle: {
77
78
  visible: boolean;
79
+ triggerMinSize: number;
78
80
  symbolType: string;
79
81
  fill: string;
80
82
  stroke: string;
@@ -95,3 +97,19 @@ export declare const DEFAULT_DATA_ZOOM_ATTRIBUTES: {
95
97
  };
96
98
  };
97
99
  };
100
+ export declare const DEFAULT_HANDLER_ATTR_MAP: {
101
+ horizontal: {
102
+ angle: number;
103
+ strokeBoundsBuffer: number;
104
+ boundsPadding: number;
105
+ pickMode: string;
106
+ cursor: string;
107
+ };
108
+ vertical: {
109
+ angle: number;
110
+ cursor: string;
111
+ boundsPadding: number;
112
+ pickMode: string;
113
+ strokeBoundsBuffer: number;
114
+ };
115
+ };
@@ -2,7 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.DEFAULT_DATA_ZOOM_ATTRIBUTES = void 0, exports.DEFAULT_DATA_ZOOM_ATTRIBUTES = {
5
+ }), exports.DEFAULT_HANDLER_ATTR_MAP = exports.DEFAULT_DATA_ZOOM_ATTRIBUTES = void 0,
6
+ exports.DEFAULT_DATA_ZOOM_ATTRIBUTES = {
6
7
  orient: "bottom",
7
8
  showDetail: "auto",
8
9
  brushSelect: !0,
@@ -72,6 +73,7 @@ Object.defineProperty(exports, "__esModule", {
72
73
  },
73
74
  startHandlerStyle: {
74
75
  visible: !0,
76
+ triggerMinSize: 40,
75
77
  symbolType: "M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z",
76
78
  fill: "white",
77
79
  stroke: "#B0C8F9",
@@ -79,6 +81,7 @@ Object.defineProperty(exports, "__esModule", {
79
81
  },
80
82
  endHandlerStyle: {
81
83
  visible: !0,
84
+ triggerMinSize: 40,
82
85
  symbolType: "M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z",
83
86
  fill: "white",
84
87
  stroke: "#B0C8F9",
@@ -98,4 +101,19 @@ Object.defineProperty(exports, "__esModule", {
98
101
  fill: "#6F6F6F"
99
102
  }
100
103
  }
104
+ }, exports.DEFAULT_HANDLER_ATTR_MAP = {
105
+ horizontal: {
106
+ angle: 0,
107
+ strokeBoundsBuffer: 0,
108
+ boundsPadding: 2,
109
+ pickMode: "imprecise",
110
+ cursor: "ew-resize"
111
+ },
112
+ vertical: {
113
+ angle: Math.PI / 180 * 90,
114
+ cursor: "ns-resize",
115
+ boundsPadding: 2,
116
+ pickMode: "imprecise",
117
+ strokeBoundsBuffer: 0
118
+ }
101
119
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/data-zoom/config.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG;IAC1C,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE;QACf,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;KAChB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,GAAG;KACjB;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE,SAAS;SAChB;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;SACb;KACF;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,GAAG;KACjB;IACD,4BAA4B,EAAE;QAC5B,IAAI,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE,SAAS;SAChB;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;SACb;KACF;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE;YACV,IAAI,EAAE,CAAC;YACP,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,SAAS;gBACjB,YAAY,EAAE,CAAC;aAChB;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,SAAS;YACjB,UAAU,EAER,8PAA8P;YAChQ,SAAS,EAAE,GAAG;SACf;KACF;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE,IAAI;QACb,UAAU,EAER,yiBAAyiB;QAE3iB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,GAAG;KACf;IACD,eAAe,EAAE;QACf,OAAO,EAAE,IAAI;QACb,UAAU,EAER,yiBAAyiB;QAE3iB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,GAAG;KACf;IACD,cAAc,EAAE;QACd,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;SAChB;KACF;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;SAChB;KACF;CACF,CAAC","file":"config.js","sourcesContent":["export const DEFAULT_DATA_ZOOM_ATTRIBUTES = {\n orient: 'bottom',\n showDetail: 'auto',\n brushSelect: true,\n zoomLock: false,\n minSpan: 0,\n maxSpan: 1,\n delayType: 'throttle',\n delayTime: 0,\n realTime: true,\n backgroundStyle: {\n fill: 'white',\n stroke: '#D1DBEE',\n lineWidth: 1,\n cornerRadius: 2\n },\n dragMaskStyle: {\n fill: '#B0C8F9',\n fillOpacity: 0.2\n },\n backgroundChartStyle: {\n area: {\n visible: true,\n stroke: '#D1DBEE',\n lineWidth: 1,\n fill: '#F6F8FC'\n },\n line: {\n visible: true,\n stroke: '#D1DBEE',\n lineWidth: 1\n }\n },\n selectedBackgroundStyle: {\n fill: '#B0C8F9',\n fillOpacity: 0.5\n },\n selectedBackgroundChartStyle: {\n area: {\n visible: true,\n stroke: '#B0C8F9',\n lineWidth: 1,\n fill: '#fbb934'\n },\n line: {\n visible: true,\n stroke: '#fbb934',\n lineWidth: 1\n }\n },\n middleHandlerStyle: {\n visible: true,\n background: {\n size: 8,\n style: {\n fill: 'white',\n stroke: '#B0C8F9',\n cornerRadius: 2\n }\n },\n icon: {\n size: 6,\n fill: 'white',\n stroke: '#B0C8F9',\n symbolType:\n // eslint-disable-next-line max-len\n 'M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z',\n lineWidth: 0.5\n }\n },\n startHandlerStyle: {\n visible: true,\n symbolType:\n // eslint-disable-next-line max-len\n 'M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z',\n // size: 40,\n fill: 'white',\n stroke: '#B0C8F9',\n lineWidth: 0.5\n },\n endHandlerStyle: {\n visible: true,\n symbolType:\n // eslint-disable-next-line max-len\n 'M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z',\n // size: 40,\n fill: 'white',\n stroke: '#B0C8F9',\n lineWidth: 0.5\n },\n startTextStyle: {\n padding: 4,\n textStyle: {\n fontSize: 10,\n fill: '#6F6F6F'\n }\n },\n endTextStyle: {\n padding: 4,\n textStyle: {\n fontSize: 10,\n fill: '#6F6F6F'\n }\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/data-zoom/config.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG;IAC1C,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE;QACf,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;KAChB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,GAAG;KACjB;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE,SAAS;SAChB;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;SACb;KACF;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,GAAG;KACjB;IACD,4BAA4B,EAAE;QAC5B,IAAI,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE,SAAS;SAChB;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;SACb;KACF;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE;YACV,IAAI,EAAE,CAAC;YACP,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,SAAS;gBACjB,YAAY,EAAE,CAAC;aAChB;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,SAAS;YACjB,UAAU,EAER,8PAA8P;YAChQ,SAAS,EAAE,GAAG;SACf;KACF;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,EAAE;QAClB,UAAU,EAER,yiBAAyiB;QAE3iB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,GAAG;KACf;IACD,eAAe,EAAE;QACf,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,EAAE;QAClB,UAAU,EAER,yiBAAyiB;QAE3iB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,GAAG;KACf;IACD,cAAc,EAAE;QACd,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;SAChB;KACF;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;SAChB;KACF;CACF,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,kBAAkB,EAAE,CAAC;QACrB,aAAa,EAAE,CAAC;QAChB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;KACpB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;QAC3B,MAAM,EAAE,WAAW;QACnB,aAAa,EAAE,CAAC;QAChB,QAAQ,EAAE,WAAW;QACrB,kBAAkB,EAAE,CAAC;KACtB;CACF,CAAC","file":"config.js","sourcesContent":["export const DEFAULT_DATA_ZOOM_ATTRIBUTES = {\n orient: 'bottom',\n showDetail: 'auto',\n brushSelect: true,\n zoomLock: false,\n minSpan: 0,\n maxSpan: 1,\n delayType: 'throttle',\n delayTime: 0,\n realTime: true,\n backgroundStyle: {\n fill: 'white',\n stroke: '#D1DBEE',\n lineWidth: 1,\n cornerRadius: 2\n },\n dragMaskStyle: {\n fill: '#B0C8F9',\n fillOpacity: 0.2\n },\n backgroundChartStyle: {\n area: {\n visible: true,\n stroke: '#D1DBEE',\n lineWidth: 1,\n fill: '#F6F8FC'\n },\n line: {\n visible: true,\n stroke: '#D1DBEE',\n lineWidth: 1\n }\n },\n selectedBackgroundStyle: {\n fill: '#B0C8F9',\n fillOpacity: 0.5\n },\n selectedBackgroundChartStyle: {\n area: {\n visible: true,\n stroke: '#B0C8F9',\n lineWidth: 1,\n fill: '#fbb934'\n },\n line: {\n visible: true,\n stroke: '#fbb934',\n lineWidth: 1\n }\n },\n middleHandlerStyle: {\n visible: true,\n background: {\n size: 8,\n style: {\n fill: 'white',\n stroke: '#B0C8F9',\n cornerRadius: 2\n }\n },\n icon: {\n size: 6,\n fill: 'white',\n stroke: '#B0C8F9',\n symbolType:\n // eslint-disable-next-line max-len\n 'M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z',\n lineWidth: 0.5\n }\n },\n startHandlerStyle: {\n visible: true,\n triggerMinSize: 40,\n symbolType:\n // eslint-disable-next-line max-len\n 'M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z',\n // size: 40,\n fill: 'white',\n stroke: '#B0C8F9',\n lineWidth: 0.5\n },\n endHandlerStyle: {\n visible: true,\n triggerMinSize: 40,\n symbolType:\n // eslint-disable-next-line max-len\n 'M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z',\n // size: 40,\n fill: 'white',\n stroke: '#B0C8F9',\n lineWidth: 0.5\n },\n startTextStyle: {\n padding: 4,\n textStyle: {\n fontSize: 10,\n fill: '#6F6F6F'\n }\n },\n endTextStyle: {\n padding: 4,\n textStyle: {\n fontSize: 10,\n fill: '#6F6F6F'\n }\n }\n};\n\nexport const DEFAULT_HANDLER_ATTR_MAP = {\n horizontal: {\n angle: 0,\n strokeBoundsBuffer: 0,\n boundsPadding: 2,\n pickMode: 'imprecise',\n cursor: 'ew-resize'\n },\n vertical: {\n angle: 90 * (Math.PI / 180),\n cursor: 'ns-resize',\n boundsPadding: 2,\n pickMode: 'imprecise',\n strokeBoundsBuffer: 0\n }\n};\n"]}
@@ -78,6 +78,7 @@ export declare class DataZoom extends AbstractComponent<Required<DataZoomAttribu
78
78
  };
79
79
  startHandlerStyle: {
80
80
  visible: boolean;
81
+ triggerMinSize: number;
81
82
  symbolType: string;
82
83
  fill: string;
83
84
  stroke: string;
@@ -85,6 +86,7 @@ export declare class DataZoom extends AbstractComponent<Required<DataZoomAttribu
85
86
  };
86
87
  endHandlerStyle: {
87
88
  visible: boolean;
89
+ triggerMinSize: number;
88
90
  symbolType: string;
89
91
  fill: string;
90
92
  stroke: string;
@@ -108,9 +110,11 @@ export declare class DataZoom extends AbstractComponent<Required<DataZoomAttribu
108
110
  private _isHorizontal;
109
111
  private _background;
110
112
  private _container;
113
+ private _startHandlerMask;
111
114
  private _startHandler;
112
115
  private _middleHandlerSymbol;
113
116
  private _middleHandlerRect;
117
+ private _endHandlerMask;
114
118
  private _endHandler;
115
119
  private _selectedBackground;
116
120
  private _dragMask;
@@ -42,8 +42,8 @@ class DataZoom extends base_1.AbstractComponent {
42
42
  end: 1
43
43
  }, this._statePointToData = state => state, this._onHandlerPointerDown = (e, tag) => {
44
44
  e.stopPropagation(), "start" === tag ? (this._activeTag = type_1.DataZoomActiveTag.startHandler,
45
- this._activeItem = this._startHandler) : "end" === tag ? (this._activeTag = type_1.DataZoomActiveTag.endHandler,
46
- this._activeItem = this._endHandler) : "middleRect" === tag ? (this._activeTag = type_1.DataZoomActiveTag.middleHandler,
45
+ this._activeItem = this._startHandlerMask) : "end" === tag ? (this._activeTag = type_1.DataZoomActiveTag.endHandler,
46
+ this._activeItem = this._endHandlerMask) : "middleRect" === tag ? (this._activeTag = type_1.DataZoomActiveTag.middleHandler,
47
47
  this._activeItem = this._middleHandlerRect) : "middleSymbol" === tag ? (this._activeTag = type_1.DataZoomActiveTag.middleHandler,
48
48
  this._activeItem = this._middleHandlerSymbol) : "background" === tag && (this._activeTag = type_1.DataZoomActiveTag.background,
49
49
  this._activeItem = this._background), this._activeState = !0, this._activeCache.startPos = this.eventPosToStagePos(e),
@@ -81,8 +81,8 @@ class DataZoom extends base_1.AbstractComponent {
81
81
  bindEvents() {
82
82
  if (this.attribute.disableTriggerEvent) return;
83
83
  const {showDetail: showDetail, brushSelect: brushSelect} = this.attribute;
84
- this._startHandler && this._startHandler.addEventListener("pointerdown", (e => this._onHandlerPointerDown(e, "start"))),
85
- this._endHandler && this._endHandler.addEventListener("pointerdown", (e => this._onHandlerPointerDown(e, "end"))),
84
+ this._startHandlerMask && this._startHandlerMask.addEventListener("pointerdown", (e => this._onHandlerPointerDown(e, "start"))),
85
+ this._endHandlerMask && this._endHandlerMask.addEventListener("pointerdown", (e => this._onHandlerPointerDown(e, "end"))),
86
86
  this._middleHandlerSymbol && this._middleHandlerSymbol.addEventListener("pointerdown", (e => this._onHandlerPointerDown(e, "middleSymbol"))),
87
87
  this._middleHandlerRect && this._middleHandlerRect.addEventListener("pointerdown", (e => this._onHandlerPointerDown(e, "middleRect")));
88
88
  const selectedTag = brushSelect ? "background" : "middleRect";
@@ -244,17 +244,17 @@ class DataZoom extends base_1.AbstractComponent {
244
244
  }, this._layoutAttrFromConfig;
245
245
  }
246
246
  render() {
247
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
247
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
248
248
  this._layoutAttrFromConfig = null;
249
- const {orient: orient, backgroundStyle: backgroundStyle, backgroundChartStyle: backgroundChartStyle, selectedBackgroundStyle: selectedBackgroundStyle, selectedBackgroundChartStyle: selectedBackgroundChartStyle, middleHandlerStyle: middleHandlerStyle, startHandlerStyle: startHandlerStyle, endHandlerStyle: endHandlerStyle, brushSelect: brushSelect} = this.attribute, {start: start, end: end} = this.state, {position: position, width: width, height: height} = this.getLayoutAttrFromConfig(), group = this.createOrUpdateChild("dataZoom-container", {}, "group");
250
- this._container = group, this._background = group.createOrUpdateChild("background", Object.assign({
249
+ const {orient: orient, backgroundStyle: backgroundStyle, backgroundChartStyle: backgroundChartStyle, selectedBackgroundStyle: selectedBackgroundStyle, selectedBackgroundChartStyle: selectedBackgroundChartStyle, middleHandlerStyle: middleHandlerStyle, startHandlerStyle: startHandlerStyle, endHandlerStyle: endHandlerStyle, brushSelect: brushSelect} = this.attribute, {start: start, end: end} = this.state, {position: position, width: width, height: height} = this.getLayoutAttrFromConfig(), startHandlerMinSize = null !== (_a = startHandlerStyle.triggerMinSize) && void 0 !== _a ? _a : 40, endHandlerMinSize = null !== (_b = endHandlerStyle.triggerMinSize) && void 0 !== _b ? _b : 40, group = this.createOrUpdateChild("dataZoom-container", {}, "group");
250
+ if (this._container = group, this._background = group.createOrUpdateChild("background", Object.assign({
251
251
  x: position.x,
252
252
  y: position.y,
253
253
  width: width,
254
254
  height: height,
255
255
  cursor: brushSelect ? "crosshair" : "auto"
256
- }, backgroundStyle), "rect"), (null === (_a = null == backgroundChartStyle ? void 0 : backgroundChartStyle.line) || void 0 === _a ? void 0 : _a.visible) && this.setPreviewAttributes("line", group),
257
- (null === (_b = null == backgroundChartStyle ? void 0 : backgroundChartStyle.area) || void 0 === _b ? void 0 : _b.visible) && this.setPreviewAttributes("area", group),
256
+ }, backgroundStyle), "rect"), (null === (_c = null == backgroundChartStyle ? void 0 : backgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setPreviewAttributes("line", group),
257
+ (null === (_d = null == backgroundChartStyle ? void 0 : backgroundChartStyle.area) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("area", group),
258
258
  brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign({
259
259
  x: position.x + start * width,
260
260
  y: position.y,
@@ -267,73 +267,92 @@ class DataZoom extends base_1.AbstractComponent {
267
267
  width: width,
268
268
  height: (end - start) * height,
269
269
  cursor: brushSelect ? "crosshair" : "move"
270
- }, selectedBackgroundStyle), "rect"), (null === (_c = null == selectedBackgroundChartStyle ? void 0 : selectedBackgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setSelectedPreviewAttributes("line", group),
271
- (null === (_d = null == selectedBackgroundChartStyle ? void 0 : selectedBackgroundChartStyle.area) || void 0 === _d ? void 0 : _d.visible) && this.setSelectedPreviewAttributes("area", group),
272
- this._showText && this.renderText(), this._isHorizontal ? (this._startHandler = group.createOrUpdateChild("startHandler", Object.assign({
273
- x: position.x + start * width,
274
- y: position.y + height / 2,
275
- size: height,
276
- angle: 0,
277
- symbolType: null !== (_e = null == startHandlerStyle ? void 0 : startHandlerStyle.symbolType) && void 0 !== _e ? _e : "square",
278
- cursor: "ew-resize",
279
- strokeBoundsBuffer: 0,
280
- boundsPadding: 2,
281
- pickMode: "imprecise"
282
- }, startHandlerStyle), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign({
283
- x: position.x + end * width,
284
- y: position.y + height / 2,
285
- size: height,
286
- angle: 0,
287
- symbolType: null !== (_f = null == endHandlerStyle ? void 0 : endHandlerStyle.symbolType) && void 0 !== _f ? _f : "square",
288
- cursor: "ew-resize",
289
- strokeBoundsBuffer: 0,
290
- boundsPadding: 2,
291
- pickMode: "imprecise"
292
- }, endHandlerStyle), "symbol"), (null == middleHandlerStyle ? void 0 : middleHandlerStyle.visible) && (this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign({
293
- x: position.x + start * width,
294
- y: position.y - ((null === (_g = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _g ? void 0 : _g.size) || 10),
295
- width: (end - start) * width,
296
- height: (null === (_h = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _h ? void 0 : _h.size) || 10
297
- }, null === (_j = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _j ? void 0 : _j.style), "rect"),
298
- this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign({
299
- x: position.x + (start + end) / 2 * width,
300
- y: position.y - ((null === (_k = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _k ? void 0 : _k.size) || 10) / 2,
301
- strokeBoundsBuffer: 0,
302
- angle: 0,
303
- symbolType: null !== (_m = null === (_l = null == middleHandlerStyle ? void 0 : middleHandlerStyle.icon) || void 0 === _l ? void 0 : _l.symbolType) && void 0 !== _m ? _m : "square"
304
- }, null == middleHandlerStyle ? void 0 : middleHandlerStyle.icon), "symbol"))) : (this._startHandler = group.createOrUpdateChild("startHandler", Object.assign({
305
- x: position.x + width / 2,
306
- y: position.y + start * height,
307
- size: width,
308
- angle: Math.PI / 180 * 90,
309
- symbolType: null !== (_o = null == startHandlerStyle ? void 0 : startHandlerStyle.symbolType) && void 0 !== _o ? _o : "square",
310
- cursor: "ns-resize",
311
- boundsPadding: 2,
312
- pickMode: "imprecise",
313
- strokeBoundsBuffer: 0
314
- }, startHandlerStyle), "symbol"), (null == middleHandlerStyle ? void 0 : middleHandlerStyle.visible) && (this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign({
315
- x: "left" === orient ? position.x - ((null === (_p = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _p ? void 0 : _p.size) || 10) : position.x + width,
316
- y: position.y + start * height,
317
- width: (null === (_q = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _q ? void 0 : _q.size) || 10,
318
- height: (end - start) * height
319
- }, null === (_r = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _r ? void 0 : _r.style), "rect"),
320
- this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign({
321
- x: "left" === orient ? position.x - ((null === (_s = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _s ? void 0 : _s.size) || 10) / 2 : position.x + width + ((null === (_t = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _t ? void 0 : _t.size) || 10) / 2,
322
- y: position.y + (start + end) / 2 * height,
323
- angle: Math.PI / 180 * 90,
324
- symbolType: null !== (_v = null === (_u = null == middleHandlerStyle ? void 0 : middleHandlerStyle.icon) || void 0 === _u ? void 0 : _u.symbolType) && void 0 !== _v ? _v : "square",
325
- strokeBoundsBuffer: 0
326
- }, null == middleHandlerStyle ? void 0 : middleHandlerStyle.icon), "symbol")), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign({
327
- x: position.x + width / 2,
328
- y: position.y + end * height,
329
- size: width,
330
- angle: Math.PI / 180 * 90,
331
- symbolType: null !== (_w = null == endHandlerStyle ? void 0 : endHandlerStyle.symbolType) && void 0 !== _w ? _w : "square",
332
- cursor: "ns-resize",
333
- boundsPadding: 2,
334
- pickMode: "imprecise",
335
- strokeBoundsBuffer: 0
336
- }, endHandlerStyle), "symbol"));
270
+ }, selectedBackgroundStyle), "rect"), (null === (_e = null == selectedBackgroundChartStyle ? void 0 : selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this.setSelectedPreviewAttributes("line", group),
271
+ (null === (_f = null == selectedBackgroundChartStyle ? void 0 : selectedBackgroundChartStyle.area) || void 0 === _f ? void 0 : _f.visible) && this.setSelectedPreviewAttributes("area", group),
272
+ this._showText && this.renderText(), this._isHorizontal) {
273
+ this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign({
274
+ x: position.x + start * width,
275
+ y: position.y + height / 2,
276
+ size: height,
277
+ symbolType: null !== (_g = null == startHandlerStyle ? void 0 : startHandlerStyle.symbolType) && void 0 !== _g ? _g : "square"
278
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), "symbol"),
279
+ this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign({
280
+ x: position.x + end * width,
281
+ y: position.y + height / 2,
282
+ size: height,
283
+ symbolType: null !== (_h = null == endHandlerStyle ? void 0 : endHandlerStyle.symbolType) && void 0 !== _h ? _h : "square"
284
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), "symbol");
285
+ const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize), startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize), endHandlerWidth = Math.max(this._endHandler.AABBBounds.width(), endHandlerMinSize), endHandlerHeight = Math.max(this._endHandler.AABBBounds.height(), endHandlerMinSize);
286
+ this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign({
287
+ x: position.x + start * width - startHandlerWidth / 2,
288
+ y: position.y + height / 2 - startHandlerHeight / 2,
289
+ width: startHandlerWidth,
290
+ height: startHandlerHeight,
291
+ fill: "white",
292
+ fillOpacity: 0
293
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign({
294
+ x: position.x + end * width - endHandlerWidth / 2,
295
+ y: position.y + height / 2 - endHandlerHeight / 2,
296
+ width: endHandlerWidth,
297
+ height: endHandlerHeight,
298
+ fill: "white",
299
+ fillOpacity: 0
300
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), "rect"), (null == middleHandlerStyle ? void 0 : middleHandlerStyle.visible) && (this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign({
301
+ x: position.x + start * width,
302
+ y: position.y - ((null === (_j = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _j ? void 0 : _j.size) || 10),
303
+ width: (end - start) * width,
304
+ height: (null === (_k = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _k ? void 0 : _k.size) || 10
305
+ }, null === (_l = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _l ? void 0 : _l.style), "rect"),
306
+ this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign({
307
+ x: position.x + (start + end) / 2 * width,
308
+ y: position.y - ((null === (_m = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _m ? void 0 : _m.size) || 10) / 2,
309
+ strokeBoundsBuffer: 0,
310
+ angle: 0,
311
+ symbolType: null !== (_p = null === (_o = null == middleHandlerStyle ? void 0 : middleHandlerStyle.icon) || void 0 === _o ? void 0 : _o.symbolType) && void 0 !== _p ? _p : "square"
312
+ }, null == middleHandlerStyle ? void 0 : middleHandlerStyle.icon), "symbol"));
313
+ } else {
314
+ this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign({
315
+ x: position.x + width / 2,
316
+ y: position.y + start * height,
317
+ size: width,
318
+ symbolType: null !== (_q = null == startHandlerStyle ? void 0 : startHandlerStyle.symbolType) && void 0 !== _q ? _q : "square"
319
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign({
320
+ x: position.x + width / 2,
321
+ y: position.y + end * height,
322
+ size: width,
323
+ symbolType: null !== (_r = null == endHandlerStyle ? void 0 : endHandlerStyle.symbolType) && void 0 !== _r ? _r : "square"
324
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), "symbol");
325
+ const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize), startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize), endHandlerWidth = Math.max(this._endHandler.AABBBounds.width(), endHandlerMinSize), endHandlerHeight = Math.max(this._endHandler.AABBBounds.height(), endHandlerMinSize);
326
+ this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign({
327
+ x: position.x + width / 2 - startHandlerWidth / 2,
328
+ y: position.y + start * height - startHandlerHeight / 2,
329
+ width: startHandlerWidth,
330
+ height: startHandlerHeight,
331
+ symbolType: "rect",
332
+ fill: "white",
333
+ fillOpacity: 0
334
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), "symbol"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign({
335
+ x: position.x + width / 2 - endHandlerWidth / 2,
336
+ y: position.y + end * height - endHandlerHeight / 2,
337
+ width: endHandlerWidth,
338
+ height: endHandlerHeight,
339
+ symbolType: "rect",
340
+ fill: "white",
341
+ fillOpacity: 0
342
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), "symbol"), (null == middleHandlerStyle ? void 0 : middleHandlerStyle.visible) && (this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign({
343
+ x: "left" === orient ? position.x - ((null === (_s = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _s ? void 0 : _s.size) || 10) : position.x + width,
344
+ y: position.y + start * height,
345
+ width: (null === (_t = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _t ? void 0 : _t.size) || 10,
346
+ height: (end - start) * height
347
+ }, null === (_u = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _u ? void 0 : _u.style), "rect"),
348
+ this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign({
349
+ x: "left" === orient ? position.x - ((null === (_v = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _v ? void 0 : _v.size) || 10) / 2 : position.x + width + ((null === (_w = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _w ? void 0 : _w.size) || 10) / 2,
350
+ y: position.y + (start + end) / 2 * height,
351
+ angle: Math.PI / 180 * 90,
352
+ symbolType: null !== (_y = null === (_x = null == middleHandlerStyle ? void 0 : middleHandlerStyle.icon) || void 0 === _x ? void 0 : _x.symbolType) && void 0 !== _y ? _y : "square",
353
+ strokeBoundsBuffer: 0
354
+ }, null == middleHandlerStyle ? void 0 : middleHandlerStyle.icon), "symbol"));
355
+ }
337
356
  }
338
357
  computeBasePoints() {
339
358
  const {orient: orient} = this.attribute, {position: position, width: width, height: height} = this.getLayoutAttrFromConfig();