Skip to content

Commit e14650e

Browse files
committed
Remove landmarks item from story editor form
1 parent bb282cd commit e14650e

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { IDict } from '@jupytergis/schema';
2+
3+
import { BaseForm } from './baseform';
4+
5+
/**
6+
* The form to modify a hillshade layer.
7+
*/
8+
export class StoryEditorPropertiesForm extends BaseForm {
9+
protected processSchema(
10+
data: IDict<any> | undefined,
11+
schema: IDict,
12+
uiSchema: IDict,
13+
) {
14+
super.processSchema(data, schema, uiSchema);
15+
this.removeFormEntry('landmarks', data, schema, uiSchema);
16+
}
17+
}

packages/base/src/panelview/components/story-maps/StoryEditorPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IJGISStoryMap, IJupyterGISModel } from '@jupytergis/schema';
22
import jgisSchema from '@jupytergis/schema/lib/schema/project/jgis.json';
33
import React, { useMemo } from 'react';
44

5-
import { BaseForm } from '@/src/formbuilder';
5+
import { StoryEditorPropertiesForm } from '@/src/formbuilder/objectform/StoryEditorForm';
66
import { deepCopy } from '@/src/tools';
77
import { IDict } from '@/src/types';
88

@@ -31,7 +31,7 @@ export function StoryEditorPanel({ model }: IStoryPanelProps) {
3131

3232
return (
3333
<div style={{ padding: '0 0.5rem 0.5rem 0.5rem' }}>
34-
<BaseForm
34+
<StoryEditorPropertiesForm
3535
formContext="update"
3636
sourceData={story}
3737
model={model}

0 commit comments

Comments
 (0)