dockview-core 3.1.0 → 3.1.1

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.
@@ -12,8 +12,8 @@ export declare class Tab extends CompositeDisposable {
12
12
  private readonly _element;
13
13
  private readonly dropTarget;
14
14
  private content;
15
- private readonly _onChanged;
16
- readonly onChanged: Event<MouseEvent>;
15
+ private readonly _onPointDown;
16
+ readonly onPointerDown: Event<MouseEvent>;
17
17
  private readonly _onDropped;
18
18
  readonly onDrop: Event<DroptargetEvent>;
19
19
  private readonly _onDragStart;
@@ -51,8 +51,8 @@ var Tab = /** @class */ (function (_super) {
51
51
  _this.accessor = accessor;
52
52
  _this.group = group;
53
53
  _this.content = undefined;
54
- _this._onChanged = new events_1.Emitter();
55
- _this.onChanged = _this._onChanged.event;
54
+ _this._onPointDown = new events_1.Emitter();
55
+ _this.onPointerDown = _this._onPointDown.event;
56
56
  _this._onDropped = new events_1.Emitter();
57
57
  _this.onDrop = _this._onDropped.event;
58
58
  _this._onDragStart = new events_1.Emitter();
@@ -82,13 +82,10 @@ var Tab = /** @class */ (function (_super) {
82
82
  },
83
83
  });
84
84
  _this.onWillShowOverlay = _this.dropTarget.onWillShowOverlay;
85
- _this.addDisposables(_this._onChanged, _this._onDropped, _this._onDragStart, dragHandler.onDragStart(function (event) {
85
+ _this.addDisposables(_this._onPointDown, _this._onDropped, _this._onDragStart, dragHandler.onDragStart(function (event) {
86
86
  _this._onDragStart.fire(event);
87
87
  }), dragHandler, (0, events_1.addDisposableListener)(_this._element, 'pointerdown', function (event) {
88
- if (event.defaultPrevented) {
89
- return;
90
- }
91
- _this._onChanged.fire(event);
88
+ _this._onPointDown.fire(event);
92
89
  }), _this.dropTarget.onDrop(function (event) {
93
90
  _this._onDropped.fire(event);
94
91
  }), _this.dropTarget);
@@ -253,7 +253,7 @@ var TabsContainer = /** @class */ (function (_super) {
253
253
  tab.setContent(panel.view.tab);
254
254
  var disposable = new lifecycle_1.CompositeDisposable(tab.onDragStart(function (event) {
255
255
  _this._onTabDragStart.fire({ nativeEvent: event, panel: panel });
256
- }), tab.onChanged(function (event) {
256
+ }), tab.onPointerDown(function (event) {
257
257
  if (event.defaultPrevented) {
258
258
  return;
259
259
  }
@@ -280,9 +280,6 @@ var TabsContainer = /** @class */ (function (_super) {
280
280
  _this.group.model.openPanel(panel);
281
281
  }
282
282
  break;
283
- case 1: // middle click
284
- panel.api.close();
285
- break;
286
283
  }
287
284
  }), tab.onDrop(function (event) {
288
285
  _this._onDrop.fire({
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 3.1.0
3
+ * @version 3.1.1
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -4772,8 +4772,8 @@ define(['exports'], (function (exports) { 'use strict';
4772
4772
  this.accessor = accessor;
4773
4773
  this.group = group;
4774
4774
  this.content = undefined;
4775
- this._onChanged = new Emitter();
4776
- this.onChanged = this._onChanged.event;
4775
+ this._onPointDown = new Emitter();
4776
+ this.onPointerDown = this._onPointDown.event;
4777
4777
  this._onDropped = new Emitter();
4778
4778
  this.onDrop = this._onDropped.event;
4779
4779
  this._onDragStart = new Emitter();
@@ -4803,13 +4803,10 @@ define(['exports'], (function (exports) { 'use strict';
4803
4803
  },
4804
4804
  });
4805
4805
  this.onWillShowOverlay = this.dropTarget.onWillShowOverlay;
4806
- this.addDisposables(this._onChanged, this._onDropped, this._onDragStart, dragHandler.onDragStart((event) => {
4806
+ this.addDisposables(this._onPointDown, this._onDropped, this._onDragStart, dragHandler.onDragStart((event) => {
4807
4807
  this._onDragStart.fire(event);
4808
4808
  }), dragHandler, addDisposableListener(this._element, 'pointerdown', (event) => {
4809
- if (event.defaultPrevented) {
4810
- return;
4811
- }
4812
- this._onChanged.fire(event);
4809
+ this._onPointDown.fire(event);
4813
4810
  }), this.dropTarget.onDrop((event) => {
4814
4811
  this._onDropped.fire(event);
4815
4812
  }), this.dropTarget);
@@ -5110,7 +5107,7 @@ define(['exports'], (function (exports) { 'use strict';
5110
5107
  tab.setContent(panel.view.tab);
5111
5108
  const disposable = new CompositeDisposable(tab.onDragStart((event) => {
5112
5109
  this._onTabDragStart.fire({ nativeEvent: event, panel });
5113
- }), tab.onChanged((event) => {
5110
+ }), tab.onPointerDown((event) => {
5114
5111
  if (event.defaultPrevented) {
5115
5112
  return;
5116
5113
  }
@@ -5137,9 +5134,6 @@ define(['exports'], (function (exports) { 'use strict';
5137
5134
  this.group.model.openPanel(panel);
5138
5135
  }
5139
5136
  break;
5140
- case 1: // middle click
5141
- panel.api.close();
5142
- break;
5143
5137
  }
5144
5138
  }), tab.onDrop((event) => {
5145
5139
  this._onDrop.fire({