tvcharts 0.9.22 → 0.9.23

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.
@@ -517,7 +517,13 @@ var MarkLabelView = /** @class */function (_super) {
517
517
  var _this = this;
518
518
  var timerMap = this._timerMap;
519
519
  var timer = setTimeout(function () {
520
- item.countDown.value = item.countDown.value - 1;
520
+ if (item.countDown.nextTime) {
521
+ var current_time = Date.now() + (item.countDown.dataTimeDiff || 0) * 1000;
522
+ var countDown = Math.round(item.countDown.nextTime - current_time / 1000);
523
+ item.countDown.value = countDown;
524
+ } else {
525
+ item.countDown.value = item.countDown.value - 1;
526
+ }
521
527
  var text = formatSeconds(item.countDown.value);
522
528
  el.attr('style', {
523
529
  text: text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tvcharts",
3
- "version": "0.9.22",
3
+ "version": "0.9.23",
4
4
  "main": "dist/echarts.js",
5
5
  "module": "index.js",
6
6
  "jsdelivr": "dist/echarts.min.js",
@@ -8107,6 +8107,8 @@ interface IMarkLabelData {
8107
8107
  countDown?: {
8108
8108
  value: number;
8109
8109
  show: boolean;
8110
+ dataTimeDiff?: number;
8111
+ nextTime?: number;
8110
8112
  };
8111
8113
  }
8112
8114
  interface MarkLabelOption extends ComponentOption, AnimationOptionMixin {
@@ -8108,6 +8108,8 @@ interface IMarkLabelData {
8108
8108
  countDown?: {
8109
8109
  value: number;
8110
8110
  show: boolean;
8111
+ dataTimeDiff?: number;
8112
+ nextTime?: number;
8111
8113
  };
8112
8114
  }
8113
8115
  interface MarkLabelOption extends ComponentOption, AnimationOptionMixin {
@@ -26,6 +26,8 @@ export interface IMarkLabelData {
26
26
  countDown?: {
27
27
  value: number;
28
28
  show: boolean;
29
+ dataTimeDiff?: number;
30
+ nextTime?: number;
29
31
  };
30
32
  }
31
33
  export interface MarkLabelOption extends ComponentOption, AnimationOptionMixin {