Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous updates #533

Merged
merged 5 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
this.ngZone.run(() => {
this.dialog.open(WelcomeDialogComponent, {
width: '620px',
height: '490px',
height: '495px',
panelClass: 'custom-dialog-container',
autoFocus: false,
restoreFocus: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
:host {
padding: 4px 10px 0 0;

display: grid;
align-items: center;
grid-column-gap: 8px;
Expand Down
30 changes: 17 additions & 13 deletions src/app/date-time-taken-chart/date-time-taken-chart.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<div echarts
[options]="eChartsOption"
(chartInit)="onChartInit($event)"
(chartDataZoom)="onChartDataZoom()"
(chartRestore)="onChartRestore()"
class="chart">
</div>
<div *ngIf="!isSupportedDuration" class="unsupported-overlay">
<div class="unsupported-message">
This chart does not support showing more than 30 days when Hour is selected, 3 days when Minute is selected, and 1 hour when Second is selected.<br>
Please change Year/Month/Day/Hour/Minute/Second, or select photos so that the duration is shortened.
<div class="chart-container">
<div echarts
[options]="eChartsOption"
(chartInit)="onChartInit($event)"
(chartDataZoom)="onChartDataZoom()"
(chartRestore)="onChartRestore()"
class="chart">
</div>
<div *ngIf="!isSupportedDuration" class="unsupported-overlay">
<div class="unsupported-message">
This chart does not support showing more than 30 days when Hour is selected, 3 days when Minute is selected, and 1 hour when Second is selected.<br>
Please change Year/Month/Day/Hour/Minute/Second, or select photos so that the duration is shortened.
</div>
</div>
</div>
<app-date-time-taken-chart-config class="config"></app-date-time-taken-chart-config>
<app-select-photos-within-zoom class="select-photos-within-zoom" *ngIf="isSelectPhotosWithinZoomButtonVisible"></app-select-photos-within-zoom>
<div class="sidebar">
<app-date-time-taken-chart-config class="config"></app-date-time-taken-chart-config>
<app-select-photos-within-zoom class="select-photos-within-zoom" *ngIf="isSelectPhotosWithinZoomButtonVisible"></app-select-photos-within-zoom>
</div>
26 changes: 19 additions & 7 deletions src/app/date-time-taken-chart/date-time-taken-chart.component.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
:host {
width: 100%;
height: 100%;
display: flex; // If CSS grid is used, there is an intermittent issue that the chart does not properly render when its width/height is changed by dragging the splitter.
}

$sidebar-width: 130px;

.chart-container {
height: 100%;
width: calc(100% - $sidebar-width); // If "flex-grow: 1" is used instead, there is an intermittent issue that the chart does not properly render when its width/height is changed by dragging the splitter.
position: relative;
}

Expand All @@ -13,7 +21,7 @@
position: absolute;
top: 0;
left: 0;
width: calc(100% - 130px);
width: 100%;
height: 100%;
background-color: rgba(128,128,128,0.3);
display: grid;
Expand All @@ -27,14 +35,18 @@
font-size: 15px;
}

.sidebar {
width: $sidebar-width;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: end;
}

.config {
position: absolute;
top: 0;
right: 0;
margin: 4px 10px 0 0;
}

.select-photos-within-zoom {
position: absolute;
bottom: 7px;
right: 0;
margin: 0 10px 7px 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class DateTimeTakenChartComponent {
top: 25,
bottom: 80,
left: 90,
right: 200,
right: 90,
},
tooltip: {
trigger: 'axis',
Expand All @@ -118,7 +118,7 @@ export class DateTimeTakenChartComponent {
toolbox: {
itemSize: 20,
top: 4,
right: 128,
right: 0,
feature: {
dataZoom: {
icon: {
Expand All @@ -145,7 +145,6 @@ export class DateTimeTakenChartComponent {
},
yAxis: {
type: 'value',
boundaryGap: [0, '100%'],
minInterval: 1, // Make sure Y-axis label is shown as integer.
},
dataZoom: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
:host {
margin: 0 10px 0 0;
}

button {
display: inline-block;
box-sizing: border-box;
Expand Down
7 changes: 7 additions & 0 deletions src/app/home/home.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
height: 100%;
}

app-thumbnail-generation-status-bar,
app-loaded-files-status-bar
{
z-index: 10; // To hide app-date-time-taken-chart when its height is decreased by dragging the splitter.
position: relative; // For z-index above to take effect.
}

.hidden {
display: none;
}
2 changes: 1 addition & 1 deletion src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class HomeComponent implements AfterViewInit, OnInit {

Split(['#home-map', '#home-chart'], {
direction: 'vertical',
sizes: [80, 20],
sizes: [70, 30],
minSize: 0,
gutterSize: 8, // 8px, which is the same width as the splitter gutter in Photo Data Viewer.
snapOffset: 0,
Expand Down