wavesurfer.js 6.5.0 → 6.5.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/dist/plugin/wavesurfer.cursor.js +1 -1
- package/dist/plugin/wavesurfer.cursor.min.js +1 -1
- package/dist/plugin/wavesurfer.elan.js +1 -1
- package/dist/plugin/wavesurfer.elan.min.js +1 -1
- package/dist/plugin/wavesurfer.markers.js +1 -1
- package/dist/plugin/wavesurfer.markers.min.js +1 -1
- package/dist/plugin/wavesurfer.mediasession.js +1 -1
- package/dist/plugin/wavesurfer.mediasession.min.js +1 -1
- package/dist/plugin/wavesurfer.microphone.js +1 -1
- package/dist/plugin/wavesurfer.microphone.min.js +1 -1
- package/dist/plugin/wavesurfer.minimap.js +1 -1
- package/dist/plugin/wavesurfer.minimap.min.js +1 -1
- package/dist/plugin/wavesurfer.playhead.js +1 -1
- package/dist/plugin/wavesurfer.playhead.min.js +1 -1
- package/dist/plugin/wavesurfer.regions.js +8 -15
- package/dist/plugin/wavesurfer.regions.js.map +1 -1
- package/dist/plugin/wavesurfer.regions.min.js +2 -2
- package/dist/plugin/wavesurfer.regions.min.js.map +1 -1
- package/dist/plugin/wavesurfer.spectrogram.js +1 -1
- package/dist/plugin/wavesurfer.spectrogram.min.js +1 -1
- package/dist/plugin/wavesurfer.timeline.js +1 -1
- package/dist/plugin/wavesurfer.timeline.min.js +1 -1
- package/dist/wavesurfer-html-init.js +1 -1
- package/dist/wavesurfer-html-init.min.js +1 -1
- package/dist/wavesurfer.js +2 -2
- package/dist/wavesurfer.min.js +2 -2
- package/package.json +2 -2
- package/src/plugin/regions/region.js +7 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* wavesurfer.js regions plugin 6.5.
|
|
2
|
+
* wavesurfer.js regions plugin 6.5.2 (2023-03-12)
|
|
3
3
|
* https://wavesurfer-js.org
|
|
4
4
|
* @license BSD-3-Clause
|
|
5
5
|
*/
|
|
@@ -613,7 +613,7 @@ var Region = /*#__PURE__*/function () {
|
|
|
613
613
|
key: "remove",
|
|
614
614
|
value: function remove() {
|
|
615
615
|
if (this.element) {
|
|
616
|
-
this.
|
|
616
|
+
this.element.remove();
|
|
617
617
|
this.element = null;
|
|
618
618
|
this.fireEvent('remove');
|
|
619
619
|
this.wavesurfer.un('zoom', this._onRedraw);
|
|
@@ -680,18 +680,17 @@ var Region = /*#__PURE__*/function () {
|
|
|
680
680
|
if (this.removeButton) {
|
|
681
681
|
var removeButtonEl = document.createElement('div');
|
|
682
682
|
removeButtonEl.className = 'remove-region-button';
|
|
683
|
-
removeButtonEl.
|
|
683
|
+
removeButtonEl.textContent = '⨯';
|
|
684
684
|
this.removeButtonEl = this.element.appendChild(removeButtonEl);
|
|
685
685
|
var css = {
|
|
686
686
|
zIndex: 4,
|
|
687
687
|
position: 'absolute',
|
|
688
688
|
bottom: 0,
|
|
689
|
-
right:
|
|
689
|
+
right: '4px',
|
|
690
690
|
cursor: 'pointer',
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
color: 'grey'
|
|
694
|
-
height: '14px'
|
|
691
|
+
fontSize: '20px',
|
|
692
|
+
lineHeight: '21px',
|
|
693
|
+
color: 'grey'
|
|
695
694
|
};
|
|
696
695
|
this.style(this.removeButtonEl, css);
|
|
697
696
|
}
|
|
@@ -700,7 +699,7 @@ var Region = /*#__PURE__*/function () {
|
|
|
700
699
|
if (this.contentEditable) {
|
|
701
700
|
var contentEl = document.createElement('div');
|
|
702
701
|
contentEl.className = 'region-content';
|
|
703
|
-
contentEl.contentEditable = true;
|
|
702
|
+
contentEl.contentEditable = 'true';
|
|
704
703
|
contentEl.innerText = this.data.text || '';
|
|
705
704
|
this.contentEl = this.element.appendChild(contentEl);
|
|
706
705
|
var _css = {
|
|
@@ -894,11 +893,6 @@ var Region = /*#__PURE__*/function () {
|
|
|
894
893
|
if (this.removeButton) {
|
|
895
894
|
this.removeButtonEl.addEventListener('click', this.onRemove.bind(this));
|
|
896
895
|
}
|
|
897
|
-
this.on('remove', function () {
|
|
898
|
-
_this3.contentEl.removeEventListener('blur', _this3.onContentBlur.bind(_this3));
|
|
899
|
-
_this3.contentEl.removeEventListener('click', _this3.onContentClick.bind(_this3));
|
|
900
|
-
_this3.removeButtonEl.removeEventListener('click', _this3.onRemove.bind(_this3));
|
|
901
|
-
});
|
|
902
896
|
}
|
|
903
897
|
}, {
|
|
904
898
|
key: "bindDragEvents",
|
|
@@ -906,7 +900,6 @@ var Region = /*#__PURE__*/function () {
|
|
|
906
900
|
var _this4 = this;
|
|
907
901
|
var container = this.wavesurfer.drawer.container;
|
|
908
902
|
var scrollSpeed = this.scrollSpeed;
|
|
909
|
-
var scrollThreshold = this.scrollThreshold;
|
|
910
903
|
var startTime;
|
|
911
904
|
var touchId;
|
|
912
905
|
var drag;
|