@checksub_team/peaks_timeline 2.0.0-alpha.4 → 2.0.0-alpha.5
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
CHANGED
package/peaks.js
CHANGED
|
@@ -15601,19 +15601,15 @@ module.exports = function (SegmentsGroup, LineGroup, LineIndicator, Utils) {
|
|
|
15601
15601
|
};
|
|
15602
15602
|
LineGroups.prototype.refreshLineYs = function () {
|
|
15603
15603
|
var y = this._peaks.options.padding - this._view.getFrameOffsetY();
|
|
15604
|
-
var anyChange = false;
|
|
15605
15604
|
for (var position in this._lineGroupsByPosition) {
|
|
15606
15605
|
if (Utils.objectHasProperty(this._lineGroupsByPosition, position)) {
|
|
15607
15606
|
if (this._lineGroupsByPosition[position].y() !== y) {
|
|
15608
|
-
anyChange = true;
|
|
15609
15607
|
this._lineGroupsByPosition[position].y(y);
|
|
15610
15608
|
}
|
|
15611
15609
|
y += this._lineGroupsByPosition[position].lineHeight() + this._peaks.options.interline;
|
|
15612
15610
|
}
|
|
15613
15611
|
}
|
|
15614
|
-
|
|
15615
|
-
this._lineIndicator.draw();
|
|
15616
|
-
}
|
|
15612
|
+
this._lineIndicator.refreshIndicators();
|
|
15617
15613
|
};
|
|
15618
15614
|
LineGroups.prototype._setLinePosition = function (lineId, position) {
|
|
15619
15615
|
const lineGroup = this._lineGroupsById[lineId];
|
|
@@ -15911,6 +15907,9 @@ module.exports = function (Konva, SVGs, Utils) {
|
|
|
15911
15907
|
anyChange = this.refreshIndicator(lineId) || anyChange;
|
|
15912
15908
|
}
|
|
15913
15909
|
}
|
|
15910
|
+
if (anyChange) {
|
|
15911
|
+
this.draw();
|
|
15912
|
+
}
|
|
15914
15913
|
return anyChange;
|
|
15915
15914
|
};
|
|
15916
15915
|
LineIndicator.prototype.draw = function () {
|
|
@@ -441,23 +441,19 @@ define([
|
|
|
441
441
|
|
|
442
442
|
LineGroups.prototype.refreshLineYs = function() {
|
|
443
443
|
var y = this._peaks.options.padding - this._view.getFrameOffsetY();
|
|
444
|
-
var anyChange = false;
|
|
445
444
|
|
|
446
445
|
// This code assumes that lines are ordered in ascending order of position
|
|
447
446
|
// This is the case as the keys are integers
|
|
448
447
|
for (var position in this._lineGroupsByPosition) {
|
|
449
448
|
if (Utils.objectHasProperty(this._lineGroupsByPosition, position)) {
|
|
450
449
|
if (this._lineGroupsByPosition[position].y() !== y) {
|
|
451
|
-
anyChange = true;
|
|
452
450
|
this._lineGroupsByPosition[position].y(y);
|
|
453
451
|
}
|
|
454
452
|
y += this._lineGroupsByPosition[position].lineHeight() + this._peaks.options.interline;
|
|
455
453
|
}
|
|
456
454
|
}
|
|
457
455
|
|
|
458
|
-
|
|
459
|
-
this._lineIndicator.draw();
|
|
460
|
-
}
|
|
456
|
+
this._lineIndicator.refreshIndicators();
|
|
461
457
|
};
|
|
462
458
|
|
|
463
459
|
LineGroups.prototype._setLinePosition = function(lineId, position) {
|