Commit 02fcc50a authored by pacome's avatar pacome

[client/geothermie] added zoom buttons in minimap

parent 33c8050e
......@@ -17,6 +17,8 @@ import { getLayout } from '../../queries/app';
import { setSystem } from '../../events/geothermie';
import { GeoMessageKey } from '../../locale';
import { renderTopMap } from '../map';
import { zoomIn, zoomOut } from 'geothermie/src/events/map';
import { divTooltipLeft } from 'sdi/components/tooltip';
const logger = debug('sdi:geothermie');
......@@ -155,6 +157,29 @@ const renderMiniMapInfos = () =>
renderCapakey()
);
const buttonZoomIn = () =>
divTooltipLeft(
tr.core('zoomIn'),
{
className: 'geo-btn geo-btn--2 geo-btn--icon geo-btn--zoom-in',
onClick: zoomIn
},
DIV({ className: 'btn__icon' })
);
const buttonZoomOut = () =>
divTooltipLeft(
tr.core('zoomOut'),
{
className: 'geo-btn geo-btn--2 geo-btn--icon geo-btn--zoom-out',
onClick: zoomOut
},
DIV({ className: 'btn__icon' })
);
const zoomButtons = () =>
DIV({ className: 'mini-map--zoom' }, buttonZoomIn(), buttonZoomOut());
const renderMinimapWrapper = () =>
DIV(
{ className: 'mini-map' },
......@@ -162,6 +187,7 @@ const renderMinimapWrapper = () =>
DIV(
{ className: 'centroid-wrapper' },
DIV({ className: 'centroid' }),
zoomButtons(),
renderTopMap()
)
);
......
......@@ -31,4 +31,16 @@
.map-scale {
right: 0px; //override default map-scale style
}
.mini-map--zoom {
.absolute(@margin / 2, @margin / 2, initial, initial);
z-index: 1;
> div {
flex: 1;
flex-shrink: 1;
&:first-child {
margin-bottom: @margin / 2;
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment