@checksub_team/peaks_timeline 2.0.0-alpha.8 → 2.0.0-alpha.9
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/package.json +1 -1
- package/peaks.js +5 -0
- package/src/components/line-groups.js +5 -0
package/package.json
CHANGED
package/peaks.js
CHANGED
|
@@ -15609,14 +15609,19 @@ module.exports = function (SegmentsGroup, LineGroup, LineIndicator, Utils) {
|
|
|
15609
15609
|
};
|
|
15610
15610
|
LineGroups.prototype.refreshLineYs = function () {
|
|
15611
15611
|
var y = this._peaks.options.padding - this._view.getFrameOffsetY();
|
|
15612
|
+
var anyChange = false;
|
|
15612
15613
|
for (var position in this._lineGroupsByPosition) {
|
|
15613
15614
|
if (Utils.objectHasProperty(this._lineGroupsByPosition, position)) {
|
|
15614
15615
|
if (this._lineGroupsByPosition[position].y() !== y) {
|
|
15615
15616
|
this._lineGroupsByPosition[position].y(y);
|
|
15617
|
+
anyChange = true;
|
|
15616
15618
|
}
|
|
15617
15619
|
y += this._lineGroupsByPosition[position].lineHeight() + this._peaks.options.interline;
|
|
15618
15620
|
}
|
|
15619
15621
|
}
|
|
15622
|
+
if (anyChange) {
|
|
15623
|
+
this._view.updateTimeline();
|
|
15624
|
+
}
|
|
15620
15625
|
this._lineIndicator.refreshIndicators();
|
|
15621
15626
|
};
|
|
15622
15627
|
LineGroups.prototype._setLinePosition = function (lineId, position) {
|
|
@@ -449,6 +449,7 @@ define([
|
|
|
449
449
|
|
|
450
450
|
LineGroups.prototype.refreshLineYs = function() {
|
|
451
451
|
var y = this._peaks.options.padding - this._view.getFrameOffsetY();
|
|
452
|
+
var anyChange = false;
|
|
452
453
|
|
|
453
454
|
// This code assumes that lines are ordered in ascending order of position
|
|
454
455
|
// This is the case as the keys are integers
|
|
@@ -456,10 +457,14 @@ define([
|
|
|
456
457
|
if (Utils.objectHasProperty(this._lineGroupsByPosition, position)) {
|
|
457
458
|
if (this._lineGroupsByPosition[position].y() !== y) {
|
|
458
459
|
this._lineGroupsByPosition[position].y(y);
|
|
460
|
+
anyChange = true;
|
|
459
461
|
}
|
|
460
462
|
y += this._lineGroupsByPosition[position].lineHeight() + this._peaks.options.interline;
|
|
461
463
|
}
|
|
462
464
|
}
|
|
465
|
+
if (anyChange) {
|
|
466
|
+
this._view.updateTimeline();
|
|
467
|
+
}
|
|
463
468
|
|
|
464
469
|
this._lineIndicator.refreshIndicators();
|
|
465
470
|
};
|