|
@@ -465,6 +465,22 @@ var TimelineUtils = /*#__PURE__*/function () {
|
|
|
mergeOptionsDeep(toArg, newOptions);
|
|
|
return toArg;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * Format numbers with len
|
|
|
+ */
|
|
|
+ }, {
|
|
|
+ key: "timePadZero",
|
|
|
+ value: function timePadZero(num) {
|
|
|
+ var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
|
+ var str = String(num);
|
|
|
+ var threshold = Math.pow(10, len - 1);
|
|
|
+ if (num < threshold) {
|
|
|
+ while (String(threshold).length > str.length) {
|
|
|
+ str = "0".concat(num);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+ }
|
|
|
}]);
|
|
|
}();
|
|
|
timelineUtils_defineProperty(TimelineUtils, "deepClone", function (previousOptions) {
|
|
@@ -2507,10 +2523,10 @@ var Timeline = /*#__PURE__*/function (_TimelineEventsEmitte) {
|
|
|
str += hours + ':';
|
|
|
}
|
|
|
if (minutes) {
|
|
|
- str += minutes + ':';
|
|
|
+ str += hours ? TimelineUtils.timePadZero(minutes) : minutes + ':';
|
|
|
}
|
|
|
if (!isNaN(seconds)) {
|
|
|
- str += seconds;
|
|
|
+ str += minutes ? TimelineUtils.timePadZero(seconds) : seconds;
|
|
|
}
|
|
|
return sign + str;
|
|
|
});
|