dockview-core 4.3.0 → 4.3.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.
@@ -148,7 +148,7 @@ var DockviewComponent = /** @class */ (function (_super) {
148
148
  _this.onDidPopoutGroupPositionChange = _this._onDidPopoutGroupPositionChange.event;
149
149
  _this._onDidLayoutFromJSON = new events_1.Emitter();
150
150
  _this.onDidLayoutFromJSON = _this._onDidLayoutFromJSON.event;
151
- _this._onDidActivePanelChange = new events_1.Emitter();
151
+ _this._onDidActivePanelChange = new events_1.Emitter({ replay: true });
152
152
  _this.onDidActivePanelChange = _this._onDidActivePanelChange.event;
153
153
  _this._onDidMovePanel = new events_1.Emitter();
154
154
  _this.onDidMovePanel = _this._onDidMovePanel.event;
@@ -164,17 +164,20 @@ var Emitter = /** @class */ (function () {
164
164
  });
165
165
  Emitter.prototype.fire = function (e) {
166
166
  var e_1, _a;
167
- this._last = e;
167
+ var _b;
168
+ if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.replay) {
169
+ this._last = e;
170
+ }
168
171
  try {
169
- for (var _b = __values(this._listeners), _c = _b.next(); !_c.done; _c = _b.next()) {
170
- var listener = _c.value;
172
+ for (var _c = __values(this._listeners), _d = _c.next(); !_d.done; _d = _c.next()) {
173
+ var listener = _d.value;
171
174
  listener.callback(e);
172
175
  }
173
176
  }
174
177
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
175
178
  finally {
176
179
  try {
177
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
180
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
178
181
  }
179
182
  finally { if (e_1) throw e_1.error; }
180
183
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 4.3.0
3
+ * @version 4.3.1
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -217,7 +217,10 @@ define(['exports'], (function (exports) { 'use strict';
217
217
  return this._event;
218
218
  }
219
219
  fire(e) {
220
- this._last = e;
220
+ var _a;
221
+ if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) {
222
+ this._last = e;
223
+ }
221
224
  for (const listener of this._listeners) {
222
225
  listener.callback(e);
223
226
  }
@@ -8253,7 +8256,7 @@ define(['exports'], (function (exports) { 'use strict';
8253
8256
  this.onDidPopoutGroupPositionChange = this._onDidPopoutGroupPositionChange.event;
8254
8257
  this._onDidLayoutFromJSON = new Emitter();
8255
8258
  this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
8256
- this._onDidActivePanelChange = new Emitter();
8259
+ this._onDidActivePanelChange = new Emitter({ replay: true });
8257
8260
  this.onDidActivePanelChange = this._onDidActivePanelChange.event;
8258
8261
  this._onDidMovePanel = new Emitter();
8259
8262
  this.onDidMovePanel = this._onDidMovePanel.event;