mirror of
https://github.com/mathuo/dockview
synced 2025-09-29 04:27:46 +00:00
feat: popout window unique id
This commit is contained in:
parent
312aeded25
commit
dbe0fe88ad
@ -539,16 +539,20 @@ export class DockviewComponent
|
|||||||
|
|
||||||
const theme = getTheme(this.gridview.element);
|
const theme = getTheme(this.gridview.element);
|
||||||
|
|
||||||
const popoutWindow = new DockviewPopoutGroupPanel(group, {
|
const popoutWindow = new DockviewPopoutGroupPanel(
|
||||||
className: theme ?? '',
|
`${this.id}-${group.id}`, // globally unique within dockview
|
||||||
popoutUrl: options?.popoutUrl ?? '/popout.html',
|
group,
|
||||||
box: {
|
{
|
||||||
left: window.screenX + box.left,
|
className: theme ?? '',
|
||||||
top: window.screenY + box.top,
|
popoutUrl: options?.popoutUrl ?? '/popout.html',
|
||||||
width: box.width,
|
box: {
|
||||||
height: box.height,
|
left: window.screenX + box.left,
|
||||||
},
|
top: window.screenY + box.top,
|
||||||
});
|
width: box.width,
|
||||||
|
height: box.height,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
popoutWindow.addDisposables(
|
popoutWindow.addDisposables(
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@ export class DockviewPopoutGroupPanel extends CompositeDisposable {
|
|||||||
readonly window: PopoutWindow;
|
readonly window: PopoutWindow;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
readonly id: string,
|
||||||
readonly group: DockviewGroupPanel,
|
readonly group: DockviewGroupPanel,
|
||||||
private readonly options: {
|
private readonly options: {
|
||||||
className: string;
|
className: string;
|
||||||
@ -16,7 +17,7 @@ export class DockviewPopoutGroupPanel extends CompositeDisposable {
|
|||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.window = new PopoutWindow('test', options.className ?? '', {
|
this.window = new PopoutWindow(id, options.className ?? '', {
|
||||||
url: this.options.popoutUrl,
|
url: this.options.popoutUrl,
|
||||||
left: this.options.box.left,
|
left: this.options.box.left,
|
||||||
top: this.options.box.top,
|
top: this.options.box.top,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user