tvcharts 0.8.84 → 0.8.85
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.
|
@@ -79,11 +79,15 @@ export function disposeCoordSysRecordIfNeeded(api, dataZoomModel) {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
var currentController = null;
|
|
82
83
|
function disposeCoordSysRecord(coordSysRecordMap, coordSysRecord) {
|
|
83
84
|
if (coordSysRecord) {
|
|
84
85
|
coordSysRecordMap.removeKey(coordSysRecord.model.uid);
|
|
85
86
|
var controller = coordSysRecord.controller;
|
|
86
87
|
controller && controller.dispose();
|
|
88
|
+
if (currentController === controller) {
|
|
89
|
+
currentController = null;
|
|
90
|
+
}
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
function createCoordSysRecord(api, coordSysModel) {
|
|
@@ -136,9 +140,13 @@ function createCoordSysRecord(api, coordSysModel) {
|
|
|
136
140
|
var lastBarRightSideDiffBarCount = range[1];
|
|
137
141
|
var now = Date.now();
|
|
138
142
|
if (!controller.kineticScroll && eventName === 'pan' && event.isTouch) {
|
|
143
|
+
if (currentController === null || currentController === void 0 ? void 0 : currentController.kineticScroll) {
|
|
144
|
+
currentController.kineticScroll = null;
|
|
145
|
+
}
|
|
139
146
|
controller.kineticScroll = new KineticAnimation(0.2 /* MinScrollSpeed */ / barSpace, 7 /* MaxScrollSpeed */ / barSpace, 0.997 /* DumpingCoeff */, 15 /* ScrollMinMove */ / barSpace);
|
|
140
147
|
controller.minScrollUnit = 1 / barSpace;
|
|
141
148
|
controller.kineticScroll.addPosition(lastBarRightSideDiffBarCount, now);
|
|
149
|
+
currentController = controller;
|
|
142
150
|
} else if (controller.kineticScroll) {
|
|
143
151
|
controller.kineticScroll.addPosition(lastBarRightSideDiffBarCount, now);
|
|
144
152
|
controller.startPositionX = lastBarRightSideDiffBarCount;
|