igniteui-dockmanager 2.1.1 → 2.1.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/components/dockmanager/dockmanager-component.js +1 -1
- package/components/dockmanager/dockmanager.service.d.ts +1 -0
- package/components/dockmanager/dockmanager.service.js +19 -8
- package/custom-elements.json +1502 -1493
- package/igniteui-dockmanager.css-data.json +1 -1
- package/igniteui-dockmanager.html-data.json +1 -1
- package/package.json +1 -1
- package/web-types.json +2 -2
|
@@ -1989,7 +1989,7 @@ export default class IgcDockManagerComponent extends EventEmitterMixin(LitElemen
|
|
|
1989
1989
|
}
|
|
1990
1990
|
handlePaneContentPointerDown(pane) {
|
|
1991
1991
|
requestAnimationFrame(() => {
|
|
1992
|
-
const rootNode = this.
|
|
1992
|
+
const rootNode = this.getRootNode();
|
|
1993
1993
|
if (this === rootNode.activeElement ||
|
|
1994
1994
|
!this.contains(rootNode.activeElement)) {
|
|
1995
1995
|
this.setFocus(pane);
|
|
@@ -22,6 +22,7 @@ export declare class IgcDockManagerService {
|
|
|
22
22
|
private isUpdatingLayout;
|
|
23
23
|
private lastSwapCenter;
|
|
24
24
|
private _splitterSize;
|
|
25
|
+
private _previousLocationMap;
|
|
25
26
|
visibleDocuments: IgcContentPane[];
|
|
26
27
|
visibleContentPanes: IgcContentPane[];
|
|
27
28
|
documentHosts: IgcDocumentHost[];
|
|
@@ -11,6 +11,7 @@ export class IgcDockManagerService {
|
|
|
11
11
|
this.contentPanesCache = [];
|
|
12
12
|
this.isUpdatingLayout = false;
|
|
13
13
|
this._splitterSize = null;
|
|
14
|
+
this._previousLocationMap = null;
|
|
14
15
|
this.visibleDocuments = [];
|
|
15
16
|
this.visibleContentPanes = [];
|
|
16
17
|
this.documentHosts = [];
|
|
@@ -111,17 +112,22 @@ export class IgcDockManagerService {
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
resolvePaneUnpinLocation(pane) {
|
|
114
|
-
let unpinnedLocation;
|
|
115
115
|
if (pane.unpinnedLocation) {
|
|
116
|
-
|
|
116
|
+
return pane.unpinnedLocation;
|
|
117
117
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
const documentHost = this.findClosestDocumentHost(pane);
|
|
119
|
+
if (documentHost) {
|
|
120
|
+
const panePath = this.getPanePath(pane);
|
|
121
|
+
const docHostPath = this.getPanePath(documentHost);
|
|
122
|
+
if (panePath.length > 0 &&
|
|
123
|
+
docHostPath.length > 0 &&
|
|
124
|
+
panePath[0] === docHostPath[0]) {
|
|
125
|
+
return this.findPaneUnpinLocation(pane, documentHost);
|
|
126
|
+
}
|
|
123
127
|
}
|
|
124
|
-
|
|
128
|
+
const previousLocation = this._previousLocationMap?.get(pane.contentId) ??
|
|
129
|
+
this.unpinnedLocationMap.get(pane);
|
|
130
|
+
return previousLocation ?? 'left';
|
|
125
131
|
}
|
|
126
132
|
addContentPanePinLocation(pane) {
|
|
127
133
|
if (pane.isPinned === false) {
|
|
@@ -654,6 +660,10 @@ export class IgcDockManagerService {
|
|
|
654
660
|
.filter((pane) => pane && pane.id != null)
|
|
655
661
|
.map((pane) => pane.id);
|
|
656
662
|
this.paneParentMap = new Map();
|
|
663
|
+
this._previousLocationMap = new Map();
|
|
664
|
+
for (const [pane, location] of this.unpinnedLocationMap) {
|
|
665
|
+
this._previousLocationMap.set(pane.contentId, location);
|
|
666
|
+
}
|
|
657
667
|
this.unpinnedLocationMap = new Map();
|
|
658
668
|
this.clientContentPanesMap = new Map();
|
|
659
669
|
this.documentHosts = [];
|
|
@@ -680,6 +690,7 @@ export class IgcDockManagerService {
|
|
|
680
690
|
}
|
|
681
691
|
}
|
|
682
692
|
this.populatePinLocations(layout.rootPane);
|
|
693
|
+
this._previousLocationMap = null;
|
|
683
694
|
if (this.dockManager.flyoutPane &&
|
|
684
695
|
!this.unpinnedLocationMap.has(this.dockManager.flyoutPane)) {
|
|
685
696
|
this.setFlyoutPane(null, this.dockManager.flyoutPane);
|