mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-14 14:33:28 +01:00
Fix layer scrolling
This commit is contained in:
parent
1ae5594d9a
commit
4ad0d09cee
4 changed files with 32 additions and 8 deletions
11
src/app.jsx
11
src/app.jsx
|
@ -7,6 +7,7 @@ import { LayerEditor } from './layers.jsx'
|
||||||
|
|
||||||
import theme from './theme.js'
|
import theme from './theme.js'
|
||||||
import layout from './layout.scss'
|
import layout from './layout.scss'
|
||||||
|
import 'react-virtualized/styles.css';
|
||||||
|
|
||||||
export class WorkspaceDrawer extends React.Component {
|
export class WorkspaceDrawer extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -19,13 +20,13 @@ export class WorkspaceDrawer extends React.Component {
|
||||||
return <div style={{
|
return <div style={{
|
||||||
zIndex: 100,
|
zIndex: 100,
|
||||||
position: "fixed",
|
position: "fixed",
|
||||||
height: "100%",
|
left: 60,
|
||||||
left: "60",
|
|
||||||
width: 300,
|
width: 300,
|
||||||
top: "0",
|
top: 0,
|
||||||
bottom: "0",
|
bottom: 0,
|
||||||
|
overflow: "hidden",
|
||||||
backgroundColor: theme.colors.gray}
|
backgroundColor: theme.colors.gray}
|
||||||
} >
|
}>
|
||||||
{editor}
|
{editor}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ import React from 'react'
|
||||||
import { Heading, Checkbox, Slider, Switch, Input, Panel, PanelHeader, Toolbar, NavItem, Tooltip, Container, Space} from 'rebass'
|
import { Heading, Checkbox, Slider, Switch, Input, Panel, PanelHeader, Toolbar, NavItem, Tooltip, Container, Space} from 'rebass'
|
||||||
import { Button, Text } from 'rebass'
|
import { Button, Text } from 'rebass'
|
||||||
import Collapse from 'react-collapse'
|
import Collapse from 'react-collapse'
|
||||||
|
|
||||||
import theme from './theme.js'
|
import theme from './theme.js'
|
||||||
|
import scrollbars from './scrollbars.scss'
|
||||||
|
|
||||||
export class FillLayer extends React.Component {
|
export class FillLayer extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -66,7 +66,16 @@ export class LayerEditor extends React.Component {
|
||||||
});
|
});
|
||||||
return <div>
|
return <div>
|
||||||
<Heading level={2}>Layers</Heading>
|
<Heading level={2}>Layers</Heading>
|
||||||
|
<div className={scrollbars.darkScrollbar} style={{
|
||||||
|
overflowY: "scroll",
|
||||||
|
bottom:0,
|
||||||
|
left:0,
|
||||||
|
right:0,
|
||||||
|
top:40,
|
||||||
|
position: "absolute",
|
||||||
|
}}>
|
||||||
{layerPanels}
|
{layerPanels}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
src/scrollbars.scss
Normal file
12
src/scrollbars.scss
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
.darkScrollbar::-webkit-scrollbar {
|
||||||
|
background-color: #313131;
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.darkScrollbar::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 6px;
|
||||||
|
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
||||||
|
background-color: #555;
|
||||||
|
padding-left: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
|
}
|
|
@ -40,7 +40,7 @@ const border = {
|
||||||
const dark = {
|
const dark = {
|
||||||
name: 'Dark',
|
name: 'Dark',
|
||||||
color: colors.white,
|
color: colors.white,
|
||||||
fontFamily: 'Roboto, sans-serif',
|
fontFamily: 'Open Sans Bold, sans-serif',
|
||||||
scale,
|
scale,
|
||||||
fontSizes,
|
fontSizes,
|
||||||
colors,
|
colors,
|
||||||
|
@ -53,10 +53,12 @@ const dark = {
|
||||||
borderLeft: 0,
|
borderLeft: 0,
|
||||||
borderRight: 0,
|
borderRight: 0,
|
||||||
marginBottom: 0,
|
marginBottom: 0,
|
||||||
|
paddingBottom: 0,
|
||||||
},
|
},
|
||||||
PanelHeader: {
|
PanelHeader: {
|
||||||
marginRight: -10,
|
marginRight: -10,
|
||||||
fontSize: fontSizes[4],
|
marginBottom: 0,
|
||||||
|
fontSize: fontSizes[5],
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
color: colors.white,
|
color: colors.white,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue