mirror of
https://github.com/mathuo/dockview
synced 2025-08-23 02:26:36 +00:00
chore: fix sonar code smells
This commit is contained in:
parent
760c28ff8c
commit
2faf43ef80
@ -352,12 +352,8 @@ export class GridviewComponent
|
||||
const group = groupItem.value;
|
||||
if (group !== panel) {
|
||||
group.setActive(false);
|
||||
// group.api._onDidActiveChange.fire({ isActive: false });
|
||||
// group.api.setActive(false);
|
||||
} else {
|
||||
group.setActive(true);
|
||||
// group.api._onDidActiveChange.fire({ isActive: true });
|
||||
// group.setActive(true);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
@ -132,7 +132,6 @@ export abstract class GridviewPanel
|
||||
this.api.onVisibilityChange((event) => {
|
||||
const { isVisible } = event;
|
||||
const { containerApi } = this.params as GridviewInitParameters;
|
||||
// this.api.setVisible(isVisible);
|
||||
containerApi.setVisible(this, isVisible);
|
||||
}),
|
||||
this.api.onActiveChange(() => {
|
||||
|
@ -608,7 +608,6 @@ export class Groupview extends CompositeDisposable implements IGroupview {
|
||||
this.tabsContainer.hide();
|
||||
this.container.appendChild(this.watermark.element);
|
||||
|
||||
// this.contentContainer.openPanel(this.watermark);
|
||||
this.watermark.updateParentGroup(this.parent, true);
|
||||
}
|
||||
if (!this.isEmpty && this.watermark) {
|
||||
|
@ -1,7 +1,10 @@
|
||||
import { DragHandler } from '../dnd/abstractDragHandler';
|
||||
import { getPaneData, LocalSelectionTransfer } from '../dnd/dataTransfer';
|
||||
import {
|
||||
getPaneData,
|
||||
LocalSelectionTransfer,
|
||||
PaneTransfer,
|
||||
} from '../dnd/dataTransfer';
|
||||
import { Droptarget, DroptargetEvent, Position } from '../dnd/droptarget';
|
||||
import { PaneTransfer } from '../dnd/dataTransfer';
|
||||
import { Emitter, Event } from '../events';
|
||||
import { IDisposable } from '../lifecycle';
|
||||
import { Orientation } from '../splitview/core/splitview';
|
||||
@ -10,7 +13,6 @@ import {
|
||||
PanePanelInitParameter,
|
||||
PaneviewPanel,
|
||||
} from './paneviewPanel';
|
||||
import { addClasses } from '../dom';
|
||||
|
||||
interface ViewContainer {
|
||||
readonly title: string;
|
||||
|
@ -856,27 +856,20 @@ export class Splitview {
|
||||
(position > 0 || this.startSnappingEnabled)
|
||||
) {
|
||||
this.updateSash(sash, SashState.MINIMUM);
|
||||
// sash.state = SashState.Minimum;
|
||||
} else if (
|
||||
snappedAfter &&
|
||||
collapsesDown[index] &&
|
||||
(position < this.contentSize || this.endSnappingEnabled)
|
||||
) {
|
||||
// sash.state = SashState.Maximum;
|
||||
this.updateSash(sash, SashState.MAXIMUM);
|
||||
} else {
|
||||
// sash.state = SashState.Disabled;
|
||||
this.updateSash(sash, SashState.DISABLED);
|
||||
}
|
||||
} else if (min && !max) {
|
||||
// sash.state = SashState.Minimum;
|
||||
this.updateSash(sash, SashState.MINIMUM);
|
||||
} else if (!min && max) {
|
||||
// sash.state = SashState.Maximum;
|
||||
|
||||
this.updateSash(sash, SashState.MAXIMUM);
|
||||
} else {
|
||||
// sash.state = SashState.Enabled;
|
||||
this.updateSash(sash, SashState.ENABLED);
|
||||
}
|
||||
}
|
||||
|
@ -195,18 +195,15 @@ export class SplitviewComponent
|
||||
this.getPanels()
|
||||
.filter((v) => v !== view)
|
||||
.forEach((v) => {
|
||||
// v.api._;
|
||||
v.api._onDidActiveChange.fire({ isActive: false });
|
||||
if (!skipFocus) {
|
||||
v.focus();
|
||||
}
|
||||
// v.setActive(false, skipFocus);
|
||||
});
|
||||
view.api._onDidActiveChange.fire({ isActive: true });
|
||||
if (!skipFocus) {
|
||||
view.focus();
|
||||
}
|
||||
// view.setActive(true, skipFocus);
|
||||
}
|
||||
|
||||
getPanels(): SplitviewPanel[] {
|
||||
|
Loading…
x
Reference in New Issue
Block a user