Skip to content

Commit

Permalink
map config cleanup for alpha v. release (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomFractals committed Nov 13, 2021
1 parent fdb5732 commit 210173a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 49 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<img width="64" height="64" src="docs/images/equals.png" />
<img width="64" height="64" src="docs/images/heart.png" />
<br />
<br />
Unfolded Map 🗺️ Notebook 📓 Renderer for VSCode
</h1>

Expand Down
7 changes: 4 additions & 3 deletions src/renderer/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

/**
* Map config template.
*/
// rendered map hight
export const mapHeight = 480;

// map config template
export const mapConfigTemplate: any = {
"config": {
"mapState": {
Expand Down
46 changes: 6 additions & 40 deletions src/renderer/styles/styles.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.unfolded-map {
font-family: monospace;
font-size: 12px;
overflow: auto;
}

.map-container {
height: 480px;
width: 100%;
margin: 0px;
}

.unfolded-map {
font-family: monospace;
font-size: 12px;
overflow: auto;
}

.text-output {
background-color: var(--vscode-editor-background);
border: 1px solid var(--vscode-panel-border);
Expand All @@ -26,37 +26,3 @@
.text-output code {
color: var(--vscode-editor-foreground) !important;
}

/* unfolded map styles override */
.side-panel--container {
padding: 0px !important;
}
.side-bar__close {
top: 8px !important;
right: 8px !important;
}
.side-panel__panel-header {
display: none !important;
}
.side-panel__panel-header__action {
display: none !important;
}
.side-side-panel__header__bottom {
padding-top: 10px !important;
}
.side-panel__content__title {
font-size: 12px !important;
font-weight: bold;
}
.side-panel__content {
padding: 10px !important;
margin-bottom: 32px !important;
}
.bottom-widget--container {
bottom: 32px !important;
padding-left: 36px !important;
padding-right: 18px !important;
}
.map-attributions {
bottom: 0px !important;
}
10 changes: 4 additions & 6 deletions src/renderer/unfoldedMap.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {
UnfoldedMap,
setViewState
UnfoldedMap
} from '@unfolded/map-sdk';
//const mapSdk = require('@unfolded/map-sdk');

import * as config from './config';

Expand All @@ -13,16 +11,16 @@ const mapTheme = 'light_streets'; // default map theme
* Creates new map instance.
* @param {*} geoData GeoJSON data to display on the map.
* @param {*} mapContainer Map view container.
* @returns map html fragment to add to the cell output display.
* @returns map instance to display.
*/
export function createMap(geoData, mapContainer) {
let map;
try {
console.log('unfolded.map:createMap(): creating map ...');
map = new UnfoldedMap({
embed: true,
embed: false,
appendToDocument: false,
height: 600,
height: config.mapHeight,
onLoad: () => {
map.addDataset({
uuid: 'geojson data',
Expand Down

0 comments on commit 210173a

Please sign in to comment.