Commit e85a112a authored by pacome's avatar pacome

[client/geothermie] finishing the two other steps

parent b381e0db
......@@ -31,11 +31,11 @@ export type System = io.TypeOf<typeof SystemIO>;
// tslint:disable-next-line: variable-name
export const DisplayMapsSeparatorIO = io.union(
[
io.literal('hypertop'),
io.literal('top'),
io.literal('bottom-hidden'),
io.literal('big-top'),
io.literal('middle'),
io.literal('bottom'),
io.literal('hyperbottom')
io.literal('big-bottom'),
io.literal('top-hidden')
],
'DisplayMapsSeparatorIO'
);
......
......@@ -179,12 +179,12 @@ const content = () =>
{ className: 'content-top' },
toolbar(),
mapControl(),
getDisplayMapsSeparator() === 'top' ? DIV({}) : buttonMoveUp(),
buttonMoveUp(),
renderTopMap()
),
DIV(
{ className: 'content-bottom' },
getDisplayMapsSeparator() === 'bottom' ? DIV({}) : buttonMoveDown(),
buttonMoveDown(),
getRenderCake() ? renderCake() : renderBottomMap()
)
);
......
......@@ -37,39 +37,37 @@ export const resetSystem = () => assign('geo/system', null);
export const setDisplayMapsSeparator = (m: DisplayMapsSeparator) =>
assign('geo/display/maps/separator', m);
// export const mapsSeparatorMoveUp =
// () => assign(
// 'geo/display/maps/separator',
// query('geo/display/maps/separator') === 'bottom' ? 'middle' : 'top'
// );
export const mapsSeparatorMoveDown = () =>
dispatch('geo/display/maps/separator', sep => {
switch (sep) {
case 'top-hidden':
return 'big-bottom';
case 'big-bottom':
return 'middle';
case 'middle':
return 'big-top';
case 'big-top':
return 'bottom-hidden';
case 'bottom-hidden':
return 'bottom-hidden';
}
});
export const mapsSeparatorMoveUp = () =>
assign(
'geo/display/maps/separator',
query('geo/display/maps/separator') == 'hyperbottom'
? 'bottom'
: // tslint:disable-next-line: no-constant-condition
'bottom'
? 'middle'
: // tslint:disable-next-line: no-constant-condition
'middle'
? 'top'
: 'hypertop'
);
export const mapsSeparatorMoveDown = () =>
assign(
'geo/display/maps/separator',
query('geo/display/maps/separator') == 'hypertop'
? 'top'
: // tslint:disable-next-line: no-constant-condition
'top'
? 'middle'
: // tslint:disable-next-line: no-constant-condition
'middle'
? 'bottom'
: 'hyperbottom'
);
dispatch('geo/display/maps/separator', sep => {
switch (sep) {
case 'bottom-hidden':
return 'big-top';
case 'big-top':
return 'middle';
case 'middle':
return 'big-bottom';
case 'big-bottom':
return 'top-hidden';
case 'top-hidden':
return 'top-hidden';
}
});
export const setXY = (x: number, y: number) => assign('geo/xy', { x, y });
......
......@@ -55,7 +55,7 @@ export const defaultGeothermieShape = () => ({
'geo/map/top': null,
'geo/map/bottom': null,
'geo/display/maps/separator': 'bottom' as DisplayMapsSeparator,
'geo/display/maps/separator': 'big-top' as DisplayMapsSeparator,
'geo/display/dataswitch': false,
'geo/tiles': {},
......
......@@ -8,7 +8,7 @@
.absolute(0, 0, 0, 0);
}
&.hyperbottom {
&.bottom-hidden {
.content-top {
flex: 1;
}
......@@ -16,7 +16,7 @@
display: none;
}
}
&.bottom {
&.big-top {
.content-top {
flex: 2.5;
}
......@@ -32,7 +32,7 @@
flex: 1;
}
}
&.top {
&.big-bottom {
.content-top {
flex: 1;
}
......@@ -40,12 +40,12 @@
flex: 2.5;
}
}
&.hypertop {
&.top-hidden {
.content-top {
flex: 1;
display: none;
}
.content-bottom {
display: none;
flex: 1;
}
}
}
......
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