dockview-core
Advanced tools
Comparing version 1.13.1 to 1.14.0
@@ -23,4 +23,3 @@ "use strict"; | ||
var gridviewPanelApi_1 = require("./gridviewPanelApi"); | ||
// TODO find a better way to initialize and avoid needing null checks | ||
var NOT_INITIALIZED_MESSAGE = 'DockviewGroupPanelApiImpl not initialized'; | ||
var NOT_INITIALIZED_MESSAGE = 'dockview: DockviewGroupPanelApiImpl not initialized'; | ||
var DockviewGroupPanelApiImpl = /** @class */ (function (_super) { | ||
@@ -104,6 +103,4 @@ __extends(DockviewGroupPanelApiImpl, _super); | ||
DockviewGroupPanelApiImpl.prototype.initialize = function (group) { | ||
var _this = this; | ||
this._group = group; | ||
/** | ||
* TODO: Annoying initialization order caveat | ||
* TODO: Annoying initialization order caveat, find a better way to initialize and avoid needing null checks | ||
* | ||
@@ -114,2 +111,4 @@ * Due to the order on initialization we know that the model isn't defined until later in the same stack-frame of setup. | ||
*/ | ||
var _this = this; | ||
this._group = group; | ||
queueMicrotask(function () { | ||
@@ -116,0 +115,0 @@ _this._mutableDisposable.value = |
@@ -136,10 +136,8 @@ "use strict"; | ||
this.groupEventsDisposable.value = new lifecycle_1.CompositeDisposable(this.group.api.onDidVisibilityChange(function (event) { | ||
if (!event.isVisible && _this.isVisible) { | ||
var hasBecomeHidden = !event.isVisible && _this.isVisible; | ||
var hasBecomeVisible = event.isVisible && !_this.isVisible; | ||
var isActivePanel = _this.group.model.isPanelActive(_this.panel); | ||
if (hasBecomeHidden || (hasBecomeVisible && isActivePanel)) { | ||
_this._onDidVisibilityChange.fire(event); | ||
} | ||
else if (event.isVisible && | ||
!_this.isVisible && | ||
_this.group.model.isPanelActive(_this.panel)) { | ||
_this._onDidVisibilityChange.fire(event); | ||
} | ||
}), this.group.api.onDidLocationChange(function (event) { | ||
@@ -146,0 +144,0 @@ if (_this.group !== _this.panel.group) { |
@@ -126,8 +126,2 @@ "use strict"; | ||
this._title = title; | ||
this.view.update({ | ||
params: { | ||
params: this._params, | ||
title: this.title, | ||
}, | ||
}); | ||
this.api._onDidTitleChange.fire({ title: title }); | ||
@@ -171,6 +165,3 @@ } | ||
this.view.update({ | ||
params: { | ||
params: this._params, | ||
title: this.title, | ||
}, | ||
params: this._params, | ||
}); | ||
@@ -177,0 +168,0 @@ }; |
@@ -82,3 +82,3 @@ "use strict"; | ||
Stacktrace.prototype.print = function () { | ||
console.warn(this.value); | ||
console.warn('dockview: stacktrace', this.value); | ||
}; | ||
@@ -133,3 +133,3 @@ return Stacktrace; | ||
// console.warn( | ||
// `Listener already disposed`, | ||
// `dockview: listener already disposed`, | ||
// Stacktrace.create().print() | ||
@@ -180,3 +180,3 @@ // ); | ||
var listener = _d.value; | ||
console.warn((_b = listener.stacktrace) === null || _b === void 0 ? void 0 : _b.print()); | ||
console.warn('dockview: stacktrace', (_b = listener.stacktrace) === null || _b === void 0 ? void 0 : _b.print()); | ||
} | ||
@@ -183,0 +183,0 @@ } |
@@ -5,4 +5,3 @@ import { positionToDirection } from '../dnd/droptarget'; | ||
import { GridviewPanelApiImpl } from './gridviewPanelApi'; | ||
// TODO find a better way to initialize and avoid needing null checks | ||
const NOT_INITIALIZED_MESSAGE = 'DockviewGroupPanelApiImpl not initialized'; | ||
const NOT_INITIALIZED_MESSAGE = 'dockview: DockviewGroupPanelApiImpl not initialized'; | ||
export class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl { | ||
@@ -80,5 +79,4 @@ get location() { | ||
initialize(group) { | ||
this._group = group; | ||
/** | ||
* TODO: Annoying initialization order caveat | ||
* TODO: Annoying initialization order caveat, find a better way to initialize and avoid needing null checks | ||
* | ||
@@ -89,2 +87,3 @@ * Due to the order on initialization we know that the model isn't defined until later in the same stack-frame of setup. | ||
*/ | ||
this._group = group; | ||
queueMicrotask(() => { | ||
@@ -91,0 +90,0 @@ this._mutableDisposable.value = |
@@ -91,10 +91,8 @@ import { Emitter } from '../events'; | ||
this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidVisibilityChange((event) => { | ||
if (!event.isVisible && this.isVisible) { | ||
const hasBecomeHidden = !event.isVisible && this.isVisible; | ||
const hasBecomeVisible = event.isVisible && !this.isVisible; | ||
const isActivePanel = this.group.model.isPanelActive(this.panel); | ||
if (hasBecomeHidden || (hasBecomeVisible && isActivePanel)) { | ||
this._onDidVisibilityChange.fire(event); | ||
} | ||
else if (event.isVisible && | ||
!this.isVisible && | ||
this.group.model.isPanelActive(this.panel)) { | ||
this._onDidVisibilityChange.fire(event); | ||
} | ||
}), this.group.api.onDidLocationChange((event) => { | ||
@@ -101,0 +99,0 @@ if (this.group !== this.panel.group) { |
@@ -6,3 +6,3 @@ import { CompositeDisposable, } from '../../../lifecycle'; | ||
import { toggleClass } from '../../../dom'; | ||
import { WillShowOverlayLocationEvent, } from '../../dockviewGroupPanelModel'; | ||
import { WillShowOverlayLocationEvent } from '../../dockviewGroupPanelModel'; | ||
import { getPanelData } from '../../../dnd/dataTransfer'; | ||
@@ -9,0 +9,0 @@ export class TabsContainer extends CompositeDisposable { |
@@ -68,8 +68,2 @@ import { DockviewPanelApiImpl, } from '../api/dockviewPanelApi'; | ||
this._title = title; | ||
this.view.update({ | ||
params: { | ||
params: this._params, | ||
title: this.title, | ||
}, | ||
}); | ||
this.api._onDidTitleChange.fire({ title }); | ||
@@ -102,6 +96,3 @@ } | ||
this.view.update({ | ||
params: { | ||
params: this._params, | ||
title: this.title, | ||
}, | ||
params: this._params, | ||
}); | ||
@@ -108,0 +99,0 @@ } |
@@ -53,3 +53,3 @@ export var Event; | ||
print() { | ||
console.warn(this.value); | ||
console.warn('dockview: stacktrace', this.value); | ||
} | ||
@@ -96,3 +96,3 @@ } | ||
// console.warn( | ||
// `Listener already disposed`, | ||
// `dockview: listener already disposed`, | ||
// Stacktrace.create().print() | ||
@@ -125,3 +125,3 @@ // ); | ||
for (const listener of this._listeners) { | ||
console.warn((_a = listener.stacktrace) === null || _a === void 0 ? void 0 : _a.print()); | ||
console.warn('dockview: stacktrace', (_a = listener.stacktrace) === null || _a === void 0 ? void 0 : _a.print()); | ||
} | ||
@@ -128,0 +128,0 @@ }); |
{ | ||
"name": "dockview-core", | ||
"version": "1.13.1", | ||
"version": "1.14.0", | ||
"description": "Zero dependency layout manager supporting tabs, grids and splitviews", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11924575
90575