@checksub_team/peaks_timeline 1.6.0-beta.1 → 1.6.0-beta.2
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 +6 -6
- package/src/main.js +5 -0
- package/src/source-group.js +5 -6
package/package.json
CHANGED
package/peaks.js
CHANGED
|
@@ -15428,6 +15428,7 @@ module.exports = function (Colors, EventEmitter, TimelineSegments, TimelineSourc
|
|
|
15428
15428
|
lineIndicatorSelectedTextColor: '#ccc',
|
|
15429
15429
|
lineIndicatorSelectedIconColor: '#ccc',
|
|
15430
15430
|
sourceSelectedBorderWidth: 3,
|
|
15431
|
+
sourceHandleWidth: 12,
|
|
15431
15432
|
sourceTextXOffset: 10,
|
|
15432
15433
|
sourceTextYOffset: 10,
|
|
15433
15434
|
autoScrollThreshold: 0.05,
|
|
@@ -17515,7 +17516,6 @@ module.exports = function (WaveformBuilder, WaveformShape, Utils, Konva) {
|
|
|
17515
17516
|
'use strict';
|
|
17516
17517
|
var SPACING_BETWEEN_PREVIEW_AND_BORDER_RATIO = 0.15;
|
|
17517
17518
|
var SPACING_BETWEEN_PREVIEWS = 1.5;
|
|
17518
|
-
var HANDLE_WIDTH = 8;
|
|
17519
17519
|
var CORNER_RADIUS = 8;
|
|
17520
17520
|
function SourceGroup(source, peaks, layer, view) {
|
|
17521
17521
|
this._source = source;
|
|
@@ -17614,7 +17614,7 @@ module.exports = function (WaveformBuilder, WaveformShape, Utils, Konva) {
|
|
|
17614
17614
|
var newWidth = endPixel - startPixel;
|
|
17615
17615
|
if (newWidth !== this._width) {
|
|
17616
17616
|
this._width = newWidth;
|
|
17617
|
-
this._rightHandle.x(newWidth -
|
|
17617
|
+
this._rightHandle.x(newWidth - this._peaks.options.sourceHandleWidth);
|
|
17618
17618
|
this.updatePreviews();
|
|
17619
17619
|
}
|
|
17620
17620
|
};
|
|
@@ -17647,7 +17647,7 @@ module.exports = function (WaveformBuilder, WaveformShape, Utils, Konva) {
|
|
|
17647
17647
|
if (!this._leftHandle || forceCreate) {
|
|
17648
17648
|
this._leftHandle = new Konva.Rect({
|
|
17649
17649
|
x: 0,
|
|
17650
|
-
width:
|
|
17650
|
+
width: this._peaks.options.sourceHandleWidth,
|
|
17651
17651
|
height: this._unwrappedHeight,
|
|
17652
17652
|
visible: true,
|
|
17653
17653
|
draggable: this._source.resizable,
|
|
@@ -17672,8 +17672,8 @@ module.exports = function (WaveformBuilder, WaveformShape, Utils, Konva) {
|
|
|
17672
17672
|
}
|
|
17673
17673
|
if (!this._rightHandle || forceCreate) {
|
|
17674
17674
|
this._rightHandle = new Konva.Rect({
|
|
17675
|
-
x: this._width -
|
|
17676
|
-
width:
|
|
17675
|
+
x: this._width - this._peaks.options.sourceHandleWidth,
|
|
17676
|
+
width: this._peaks.options.sourceHandleWidth,
|
|
17677
17677
|
height: this._unwrappedHeight,
|
|
17678
17678
|
visible: true,
|
|
17679
17679
|
draggable: this._source.resizable,
|
|
@@ -18107,7 +18107,7 @@ module.exports = function (WaveformBuilder, WaveformShape, Utils, Konva) {
|
|
|
18107
18107
|
this._borderWidth = this._peaks.options.sourceSelectedBorderWidth;
|
|
18108
18108
|
} else {
|
|
18109
18109
|
this._border.fill(this._source.borderColor);
|
|
18110
|
-
this._borderWidth = this.
|
|
18110
|
+
this._borderWidth = this._source.borderWidth;
|
|
18111
18111
|
}
|
|
18112
18112
|
} else {
|
|
18113
18113
|
if (this._unwrap) {
|
package/src/main.js
CHANGED
package/src/source-group.js
CHANGED
|
@@ -20,7 +20,6 @@ define([
|
|
|
20
20
|
|
|
21
21
|
var SPACING_BETWEEN_PREVIEW_AND_BORDER_RATIO = 0.15;
|
|
22
22
|
var SPACING_BETWEEN_PREVIEWS = 1.5;
|
|
23
|
-
var HANDLE_WIDTH = 8;
|
|
24
23
|
var CORNER_RADIUS = 8;
|
|
25
24
|
|
|
26
25
|
/**
|
|
@@ -203,7 +202,7 @@ define([
|
|
|
203
202
|
this._width = newWidth;
|
|
204
203
|
|
|
205
204
|
// update handles
|
|
206
|
-
this._rightHandle.x(newWidth -
|
|
205
|
+
this._rightHandle.x(newWidth - this._peaks.options.sourceHandleWidth);
|
|
207
206
|
|
|
208
207
|
// update unwrap
|
|
209
208
|
this.updatePreviews();
|
|
@@ -246,7 +245,7 @@ define([
|
|
|
246
245
|
if (!this._leftHandle || forceCreate) {
|
|
247
246
|
this._leftHandle = new Konva.Rect({
|
|
248
247
|
x: 0,
|
|
249
|
-
width:
|
|
248
|
+
width: this._peaks.options.sourceHandleWidth,
|
|
250
249
|
height: this._unwrappedHeight,
|
|
251
250
|
visible: true,
|
|
252
251
|
draggable: this._source.resizable,
|
|
@@ -275,8 +274,8 @@ define([
|
|
|
275
274
|
|
|
276
275
|
if (!this._rightHandle || forceCreate) {
|
|
277
276
|
this._rightHandle = new Konva.Rect({
|
|
278
|
-
x: this._width -
|
|
279
|
-
width:
|
|
277
|
+
x: this._width - this._peaks.options.sourceHandleWidth,
|
|
278
|
+
width: this._peaks.options.sourceHandleWidth,
|
|
280
279
|
height: this._unwrappedHeight,
|
|
281
280
|
visible: true,
|
|
282
281
|
draggable: this._source.resizable,
|
|
@@ -846,7 +845,7 @@ define([
|
|
|
846
845
|
}
|
|
847
846
|
else {
|
|
848
847
|
this._border.fill(this._source.borderColor);
|
|
849
|
-
this._borderWidth = this.
|
|
848
|
+
this._borderWidth = this._source.borderWidth;
|
|
850
849
|
}
|
|
851
850
|
}
|
|
852
851
|
else {
|