-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* restore the geoJSON icon for geoJSON layer button * Add a sources panel * order the source by name * lint * Add context menu to create source * Add context menu to rename sources and remove unused sources * lint * Minimal height for the source and layer panels * Update properties panel when a source is removed * lint * Add tests on sources * lint * Register the icons in a single Map object
- Loading branch information
Showing
17 changed files
with
756 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { LabIcon, redoIcon, undoIcon } from '@jupyterlab/ui-components'; | ||
import { geoJSONIcon, rasterIcon } from './icons'; | ||
|
||
/** | ||
* The command IDs. | ||
*/ | ||
export namespace CommandIDs { | ||
export const createNew = 'jupytergis:create-new-jGIS-file'; | ||
export const redo = 'jupytergis:redo'; | ||
export const undo = 'jupytergis:undo'; | ||
|
||
// Layers and sources commands | ||
export const openLayerBrowser = 'jupytergis:openLayerBrowser'; | ||
export const newGeoJSONLayer = 'jupytergis:newGeoJSONLayer'; | ||
export const newVectorTileLayer = 'jupytergis:newVectorTileLayer'; | ||
|
||
// Sources only commands | ||
export const newGeoJSONSource = 'jupytergis:newGeoJSONSource'; | ||
export const removeSource = 'jupytergis:removeSource'; | ||
export const renameSource = 'jupytergis:renameSource'; | ||
|
||
// Layers only commands | ||
export const newVectorLayer = 'jupytergis:newVectorLayer'; | ||
|
||
export const renameLayer = 'jupytergis:renameLayer'; | ||
export const removeLayer = 'jupytergis:removeLayer'; | ||
export const renameGroup = 'jupytergis:renameGroup'; | ||
export const removeGroup = 'jupytergis:removeGroup'; | ||
|
||
export const moveLayersToGroup = 'jupytergis:moveLayersToGroup'; | ||
export const moveLayerToNewGroup = 'jupytergis:moveLayerToNewGroup'; | ||
} | ||
|
||
interface IRegisteredIcon { | ||
icon?: LabIcon; | ||
iconClass?: string; | ||
} | ||
|
||
const iconObject = { | ||
RasterSource: { icon: rasterIcon }, | ||
GeoJSONSource: { icon: geoJSONIcon }, | ||
VectorTileSource: { iconClass: 'fa fa-vector-square' }, | ||
RasterLayer: { icon: rasterIcon }, | ||
[CommandIDs.redo]: { icon: redoIcon }, | ||
[CommandIDs.undo]: { icon: undoIcon }, | ||
[CommandIDs.openLayerBrowser]: { iconClass: 'fa fa-book-open' }, | ||
[CommandIDs.newGeoJSONLayer]: { icon: geoJSONIcon }, | ||
[CommandIDs.newVectorTileLayer]: { iconClass: 'fa fa-vector-square' }, | ||
[CommandIDs.newGeoJSONSource]: { icon: geoJSONIcon }, | ||
[CommandIDs.newVectorLayer]: { iconClass: 'fa fa-vector-square' } | ||
}; | ||
|
||
/** | ||
* The registered icons | ||
*/ | ||
export const icons = new Map<string, IRegisteredIcon>( | ||
Object.entries(iconObject) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.