Skip to content

Commit

Permalink
Style for Map
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Aug 30, 2020
1 parent a5e4e1a commit ad8e11d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import RenderFields from 'volto-addons/Widgets/RenderFields';
import View from './View';
import { settings } from '~/config';

const getSchema = props => {
const getSchema = (props) => {
return {
draggable: {
type: 'boolean',
Expand All @@ -26,7 +26,7 @@ const getSchema = props => {
};
};

const Edit = props => {
const Edit = (props) => {
const [state, setState] = useState({
schema: getSchema({ ...props, providerUrl: settings.providerUrl }),
id: _uniqueId('block_'),
Expand All @@ -41,14 +41,14 @@ const Edit = props => {
/* eslint-disable-next-line */
}, [props.data.isExpandable])
return (
<div>
<>
<RenderFields
schema={state.schema}
{...props}
title="Discodata openlayers map"
/>
<View {...props} id={state.id} />
</div>
</>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ const OpenlayersMapView = (props) => {
};

return (
<React.Fragment>
<div className="openlayer-map-container">
<div id="map" className="map" />
<div id="popup" className="popup">
{state.popup.element && (
Expand Down Expand Up @@ -971,7 +971,7 @@ const OpenlayersMapView = (props) => {
<Dimmer id="map-loader" active={loader}>
<Loader />
</Dimmer>
</React.Fragment>
</div>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
height: 100%;
}

.openlayer-map-container {
height: 100%;
}

.block-edit-wrapper .openlayer-map-container {
height: 90%;
}

#map-loader.ui.active {
position: absolute !important;
pointer-events: auto !important;
Expand Down
1 change: 1 addition & 0 deletions theme/site/elements/container.variables
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
--------------------*/

/* Devices */
@mobileWidth: 100%;

/* Coupling (Add Negative Margin to container size) */

Expand Down
1 change: 1 addition & 0 deletions theme/site/globals/site.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ body.has-sidebar {
.ui.menu {
border: none;
box-shadow: none;
background-color: transparent;
&.red-menu {
.item {
color: #D63D27;
Expand Down

0 comments on commit ad8e11d

Please sign in to comment.