Skip to content

Commit adaa076

Browse files
committed
rename property to currentMode
1 parent 07f29f8 commit adaa076

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

packages/base/src/commands/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export function addCommands(
206206
current.model.toggleIdentify();
207207

208208
if (current.model.isIdentifying) {
209-
current.model.activeRightPanelTab = 'identifyPanel';
209+
current.model.currentMode = 'identifyPanel';
210210
}
211211

212212
commands.notifyCommandChanged(CommandIDs.identify);

packages/base/src/panelview/rightpanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ export const RightPanel: React.FC<IRightPanelProps> = props => {
4242
);
4343

4444
React.useEffect(() => {
45-
if (props.model.activeRightPanelTab) {
46-
setCurTab(props.model.activeRightPanelTab);
45+
if (props.model.currentMode) {
46+
setCurTab(props.model.currentMode);
4747
}
48-
}, [props.model.activeRightPanelTab]);
48+
}, [props.model.currentMode]);
4949

5050
return (
5151
<div className="jgis-right-panel-container">

packages/schema/src/interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
160160
geolocation: JgisCoordinates;
161161
localState: IJupyterGISClientState | null;
162162
annotationModel?: IAnnotationModel;
163-
activeRightPanelTab?: string;
163+
currentMode?: string;
164164

165165
themeChanged: Signal<
166166
IJupyterGISModel,

packages/schema/src/model.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,18 @@ export class JupyterGISModel implements IJupyterGISModel {
7979
return this._settings;
8080
}
8181

82-
get activeRightPanelTab(): string | undefined {
83-
return this._activeRightPanelTab;
82+
get currentMode(): string | undefined {
83+
return this._currentMode;
8484
}
8585

86-
set activeRightPanelTab(tab: string | undefined) {
87-
if (this._activeRightPanelTab !== tab) {
88-
const oldValue = this._activeRightPanelTab;
89-
this._activeRightPanelTab = tab;
86+
set currentMode(mode: string | undefined) {
87+
if (this._currentMode !== mode) {
88+
const oldValue = this._currentMode;
89+
this._currentMode = mode;
9090
this._stateChanged.emit({
91-
name: 'activeRightPanelTab',
91+
name: 'currentMode',
9292
oldValue,
93-
newValue: tab,
93+
newValue: mode,
9494
});
9595
}
9696
}
@@ -803,7 +803,7 @@ export class JupyterGISModel implements IJupyterGISModel {
803803
private _readOnly = false;
804804
private _isDisposed = false;
805805

806-
private _activeRightPanelTab: string | undefined;
806+
private _currentMode: string | undefined;
807807

808808
private _userChanged = new Signal<this, IUserData[]>(this);
809809
private _usersMap?: Map<number, any>;

0 commit comments

Comments
 (0)