Skip to content

Commit

Permalink
Fixes alignments of panel component elements
Browse files Browse the repository at this point in the history
Styles panel components individually

Makes panel components independent of the parent component

Removes the resizing of opened panel

Removes the shrinking of other panels when a different panel is opened

#1952
  • Loading branch information
ChristianE committed May 4, 2021
1 parent 38cf21b commit 40792b9
Show file tree
Hide file tree
Showing 13 changed files with 260 additions and 191 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<md-slider-container class="md-block" title="Amount of space between buildings in percent">
<span>Margin</span>
<span class="slider-title"> Margin </span>
<md-slider
flex
step="1"
Expand All @@ -20,22 +20,25 @@
ng-model="$ctrl._viewModel.margin"
ng-change="$ctrl.onChangeMarginSlider()"
aria-controls="margin-slider"
class="margin-input"
/>
</md-input-container>
</md-slider-container>

<md-input-container>
<md-checkbox
class="md-primary"
ng-model="$ctrl._viewModel.dynamicMargin"
ng-change="$ctrl.applyDynamicMargin()"
title="Set margin to default (50px)."
>
Default margin (50px)
</md-checkbox>
</md-input-container>
<div class="defaults">
<md-input-container class="default-margin">
<md-checkbox
class="md-primary"
ng-model="$ctrl._viewModel.dynamicMargin"
ng-change="$ctrl.applyDynamicMargin()"
title="Set margin to default (50px)."
>
Default margin (50px)
</md-checkbox>
</md-input-container>

<reset-settings-button-component
settings-names="appSettings.dynamicMargin"
tooltip="Reset area metric settings to their defaults"
></reset-settings-button-component>
<reset-settings-button-component
settings-names="appSettings.dynamicMargin"
tooltip="Reset area metric settings to their defaults"
></reset-settings-button-component>
</div>
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
area-settings-panel-component {
background: #ffffff;
border: 1px solid #b5b5b5;
border-top: none;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
padding: 6px;
position: relative;
overflow: visible;
font-size: 0.9em;
text-align: left;
width: 240px;

md-slider-container {
position: relative;
.slider-title {
position: absolute;
top: 0;
font-size: 0.8em;
color: grey;
left: 4px;
}
.margin-input {
height: 24px;
}
}

.defaults {
align-items: center;
display: flex;
justify-content: space-between;
}
}
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
<range-slider-component></range-slider-component>

<div ng-if="!$ctrl._viewModel.isDeltaState">
<cc-store-color-picker map-color-for="positive" label="0 to &lt; {{ $ctrl._viewModel.colorRange.from | number: 0 }}">
</cc-store-color-picker>
<cc-store-color-picker
map-color-for="neutral"
label="&ge; {{ $ctrl._viewModel.colorRange.from | number: 0 }} to &le; {{ $ctrl._viewModel.colorRange.to | number: 0 }}"
>
</cc-store-color-picker>
<cc-store-color-picker map-color-for="negative" label="&gt; {{ $ctrl._viewModel.colorRange.to | number: 0 }} to Infinite">
</cc-store-color-picker>
</div>
<div class="wrapper">
<div class="spacer" ng-if="!$ctrl._viewModel.isDeltaState">
<cc-store-color-picker map-color-for="positive" label="0 to &lt; {{ $ctrl._viewModel.colorRange.from | number: 0 }}">
</cc-store-color-picker>
<cc-store-color-picker
map-color-for="neutral"
label="&ge; {{ $ctrl._viewModel.colorRange.from | number: 0 }} to &le; {{ $ctrl._viewModel.colorRange.to | number: 0 }}"
>
</cc-store-color-picker>
<cc-store-color-picker map-color-for="negative" label="&gt; {{ $ctrl._viewModel.colorRange.to | number: 0 }} to Infinite">
</cc-store-color-picker>
</div>

<div ng-if="$ctrl._viewModel.isDeltaState">
<cc-store-color-picker map-color-for="positiveDelta" label="+&Delta;"> </cc-store-color-picker>
<cc-store-color-picker map-color-for="negativeDelta" label="-&Delta;"> </cc-store-color-picker>
</div>
<div class="spacer" ng-if="$ctrl._viewModel.isDeltaState">
<cc-store-color-picker map-color-for="positiveDelta" label="+&Delta;"> </cc-store-color-picker>
<cc-store-color-picker map-color-for="negativeDelta" label="-&Delta;"> </cc-store-color-picker>
</div>

<cc-store-color-picker map-color-for="selected" label="selected"> </cc-store-color-picker>
<cc-store-color-picker map-color-for="selected" label="selected"> </cc-store-color-picker>
</div>

<md-input-container ng-if="!$ctrl._viewModel.isDeltaState">
<md-checkbox class="md-primary" ng-model="$ctrl._viewModel.invertColorRange" ng-change="$ctrl.invertColorRange()"
>Invert Colors
</md-checkbox>
</md-input-container>
<div class="bottom-row">
<md-input-container ng-if="!$ctrl._viewModel.isDeltaState">
<md-checkbox class="md-primary" ng-model="$ctrl._viewModel.invertColorRange" ng-change="$ctrl.invertColorRange()"
>Invert Colors
</md-checkbox>
</md-input-container>

<md-input-container ng-if="$ctrl._viewModel.isDeltaState">
<md-checkbox class="md-primary" ng-model="$ctrl._viewModel.invertDeltaColors" ng-change="$ctrl.invertDeltaColors()">
Invert Colors
</md-checkbox>
</md-input-container>
<md-input-container ng-if="$ctrl._viewModel.isDeltaState">
<md-checkbox class="md-primary" ng-model="$ctrl._viewModel.invertDeltaColors" ng-change="$ctrl.invertDeltaColors()">
Invert Colors
</md-checkbox>
</md-input-container>

<reset-settings-button-component
settings-names="dynamicSettings.colorRange, appSettings.invertColorRange, appSettings.invertDeltaColors, appSettings.mapColors.positiveDelta, appSettings.mapColors.negativeDelta, appSettings.mapColors.positive, appSettings.mapColors.negative, appSettings.mapColors.neutral, appSettings.mapColors.selected"
tooltip="Reset color metric settings to their defaults"
></reset-settings-button-component>
<reset-settings-button-component
settings-names="dynamicSettings.colorRange, appSettings.invertColorRange, appSettings.invertDeltaColors, appSettings.mapColors.positiveDelta, appSettings.mapColors.negativeDelta, appSettings.mapColors.positive, appSettings.mapColors.negative, appSettings.mapColors.neutral, appSettings.mapColors.selected"
tooltip="Reset color metric settings to their defaults"
></reset-settings-button-component>
</div>
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
color-settings-panel-component {
md-card .section .section-body md-checkbox {
font-size: 0.9em;
background: #ffffff;
border: 1px solid #b5b5b5;
border-top: none;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12);
padding: 6px;
position: relative;
overflow: visible;
font-size: 0.9em;
text-align: left;
width: 262px;

.wrapper {
margin-left: 3px;
}

.spacer .cc-store-color-picker-wrapper {
margin-bottom: 12px;
}

md-checkbox .md-label {
margin-left: 25px;
margin-top: 7px;
cc-store-color-picker p.cc-store-color-picker-label {
margin-left: 12px;
}

md-checkbox .md-container {
transform: translateY(-80%);
.bottom-row {
align-items: center;
display: flex;
justify-content: space-between;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ cc-store-color-picker {
}

.color-picker-wrapper .color-picker-swatch {
width: 16px;
height: 16px;
width: 18px;
height: 18px;
padding: 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$ctrl._viewModel.totalAffectedBuildings
}} buildings with the highest amount of incoming and outgoing edges"
>
<span>Preview</span>
<span class="slider-title"> Preview </span>
<md-slider
flex
step="1"
Expand Down Expand Up @@ -33,7 +33,7 @@
</md-slider-container>

<md-slider-container class="md-block" title="Adjust the curve height">
<span>Height</span>
<span class="slider-title"> Height </span>
<md-slider
flex
step="1"
Expand Down Expand Up @@ -61,21 +61,25 @@
</md-input-container>
</md-slider-container>

<cc-store-color-picker map-color-for="outgoingEdge" label="Outgoing Edge"> </cc-store-color-picker>
<cc-store-color-picker map-color-for="incomingEdge" label="Incoming Edge"> </cc-store-color-picker>
<div class="wrapper">
<cc-store-color-picker map-color-for="outgoingEdge" label="Outgoing Edge"> </cc-store-color-picker>
<cc-store-color-picker map-color-for="incomingEdge" label="Incoming Edge"> </cc-store-color-picker>
</div>

<md-input-container>
<md-checkbox
class="md-primary"
ng-model="$ctrl._viewModel.showOnlyBuildingsWithEdges"
ng-change="$ctrl.applyShowOnlyBuildingsWithEdges()"
ng-disabled="$ctrl._viewModel.totalAffectedBuildings == 0"
>
Only nodes with edges
</md-checkbox>
</md-input-container>
<div class="bottom-row">
<md-input-container>
<md-checkbox
class="md-primary"
ng-model="$ctrl._viewModel.showOnlyBuildingsWithEdges"
ng-change="$ctrl.applyShowOnlyBuildingsWithEdges()"
ng-disabled="$ctrl._viewModel.totalAffectedBuildings == 0"
>
Only nodes with edges
</md-checkbox>
</md-input-container>

<reset-settings-button-component
settings-names="appSettings.showOnlyBuildingsWithEdges, appSettings.amountOfEdgePreviews, appSettings.edgeHeight"
tooltip="Reset edge metric settings to their defaults"
></reset-settings-button-component>
<reset-settings-button-component
settings-names="appSettings.showOnlyBuildingsWithEdges, appSettings.amountOfEdgePreviews, appSettings.edgeHeight"
tooltip="Reset edge metric settings to their defaults"
></reset-settings-button-component>
</div>
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
edge-settings-panel-component {
background: #ffffff;
border: 1px solid #b5b5b5;
border-top: none;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12);
display: block;
padding: 6px;
position: relative;
overflow: visible;
font-size: 0.9em;
text-align: left;
width: 262px;

md-slider-container {
position: relative;
.slider-title {
position: absolute;
top: 0;
font-size: 0.8em;
color: grey;
left: 4px;
}
.margin-input {
height: 24px;
}
}

.wrapper {
margin-left: 3px;
}

.wrapper cc-store-color-picker:not(:last-child) .cc-store-color-picker-wrapper {
margin-bottom: 12px;
}

cc-store-color-picker p.cc-store-color-picker-label {
margin-left: 12px;
}

.bottom-row {
align-items: center;
display: flex;
justify-content: space-between;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<md-slider-container class="md-block" title="Display the labels of the {{ $ctrl._viewModel.amountOfTopLabels }} highest buildings">
<span>Labels</span>
<span class="slider-title"> Labels </span>
<md-slider
flex
step="1"
Expand Down Expand Up @@ -36,7 +36,7 @@
</md-input-container>

<md-slider-container class="md-block" title="Adjust buildings height">
<span>Height</span>
<span class="slider-title"> Height </span>
<md-slider
flex
step="0.1"
Expand All @@ -63,13 +63,15 @@
</md-input-container>
</md-slider-container>

<md-input-container ng-if="!$ctrl._viewModel.isDeltaState">
<md-checkbox class="md-primary" ng-model="$ctrl._viewModel.invertHeight" ng-change="$ctrl.applySettingsInvertHeight()">
Invert Height
</md-checkbox>
</md-input-container>
<div class="bottom-row">
<md-input-container ng-if="!$ctrl._viewModel.isDeltaState">
<md-checkbox class="md-primary" ng-model="$ctrl._viewModel.invertHeight" ng-change="$ctrl.applySettingsInvertHeight()">
Invert Height
</md-checkbox>
</md-input-container>

<reset-settings-button-component
settings-names="appSettings.amountOfTopLabels, appSettings.scaling.y, appSettings.invertHeight"
tooltip="Reset height metric settings to their defaults"
></reset-settings-button-component>
<reset-settings-button-component
settings-names="appSettings.amountOfTopLabels, appSettings.scaling.y, appSettings.invertHeight"
tooltip="Reset height metric settings to their defaults"
></reset-settings-button-component>
</div>
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
height-settings-panel-component {
background: #ffffff;
border: 1px solid #b5b5b5;
border-top: none;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
padding: 6px;
position: relative;
overflow: visible;
font-size: 0.9em;
text-align: left;
width: 240px;

md-slider-container {
position: relative;
.slider-title {
position: absolute;
top: 0;
font-size: 0.8em;
color: grey;
left: 4px;
}
.margin-input {
height: 24px;
}
}

.bottom-row {
align-items: center;
display: flex;
justify-content: space-between;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

range-slider-component {
display: block;
margin-top: 17px;
margin-left: 5px;

* {
display: inline-block !important;
Expand Down

0 comments on commit 40792b9

Please sign in to comment.