Skip to content

Commit

Permalink
feat(icon): user @igo2/core module
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Jun 7, 2019
2 parents aba4032 + e42ce4e commit 0758af4
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 36 deletions.
35 changes: 26 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div>
<div class="app-expansion-panel-trigger-container">
<button mat-icon-button (click)="onToggleClick()">
<mat-icon *ngIf="!expanded">launch</mat-icon>
<mat-icon *ngIf="expanded" style="transform: rotate(180deg)">launch</mat-icon>
<mat-icon *ngIf="!expanded" svgIcon="launch"></mat-icon>
<mat-icon *ngIf="expanded" style="transform: rotate(180deg)" svgIcon="launch"></mat-icon>
</button>
</div>

Expand Down
9 changes: 4 additions & 5 deletions src/app/pages/portal/portal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
matTooltipShowDelay="500"
[matTooltip]="(sidenavOpened ? 'menu.close' : 'menu.open') | translate"
(click)="onToggleSidenavClick()">
<mat-icon>
<ng-container>menu</ng-container>
<mat-icon svgIcon="menu">
</mat-icon>
</button>

Expand Down Expand Up @@ -71,10 +70,10 @@
[@expansionPanelSize]="sidenavOpened ? 'reduced' : 'full'">

<ng-container expansionPanelHeader>
<!-- <igo-editor-selector igoEditorSelector [store]="editorStore" [map]="map"></igo-editor-selector> -->
<!-- <igo-workspace-selector igoWorkspaceSelector [store]="workspaceStore" [map]="map"></igo-workspace-selector> -->
<!-- <igo-actionbar
*ngIf="editor"
[store]="editor.actionStore"
*ngIf="workspace"
[store]="workspace.actionStore"
[horizontal]="true"
[xPosition]="'after'"
[yPosition]="'above'"
Expand Down
26 changes: 13 additions & 13 deletions src/app/pages/portal/portal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { MapBrowserPointerEvent as OlMapBrowserPointerEvent } from 'ol/MapBrowse
import { MediaService, ConfigService, Media } from '@igo2/core';
import {
ActionbarMode,
Editor,
EditorStore,
Workspace,
WorkspaceStore,
EntityRecord,
EntityStore,
getEntityTitle,
Expand All @@ -34,7 +34,7 @@ import {

import {
ContextState,
EditionState,
WorkspaceState,
ToolState,
MapState,
SearchState
Expand Down Expand Up @@ -161,8 +161,8 @@ export class PortalComponent implements OnInit, OnDestroy {

get toastPanelContent(): string {
let content;
if (this.editor !== undefined && this.editor.hasWidget) {
content = 'editor';
if (this.workspace !== undefined && this.workspace.hasWidget) {
content = 'workspace';
} else if (this.searchResult !== undefined) {
content = this.searchResult.meta.dataType.toLowerCase();
}
Expand All @@ -172,7 +172,7 @@ export class PortalComponent implements OnInit, OnDestroy {
get toastPanelTitle(): string {
let title;
if (
this.toastPanelContent !== 'editor' &&
this.toastPanelContent !== 'workspace' &&
this.searchResult !== undefined
) {
title = getEntityTitle(this.searchResult);
Expand All @@ -182,7 +182,7 @@ export class PortalComponent implements OnInit, OnDestroy {

get toastPanelOpened(): boolean {
const content = this.toastPanelContent;
if (content === 'editor') {
if (content === 'workspace') {
return true;
}
return this._toastPanelOpened;
Expand All @@ -192,18 +192,18 @@ export class PortalComponent implements OnInit, OnDestroy {
}
private _toastPanelOpened = false;

get editorStore(): EditorStore {
return this.editionState.store;
get workspaceStore(): WorkspaceStore {
return this.workspaceState.store;
}

get editor(): Editor {
return this.editionState.editor$.value;
get workspace(): Workspace {
return this.workspaceState.workspace$.value;
}

constructor(
private route: ActivatedRoute,
private configService: ConfigService,
private editionState: EditionState,
private workspaceState: WorkspaceState,
public authService: AuthService,
public mediaService: MediaService,
public layerService: LayerService,
Expand Down Expand Up @@ -332,7 +332,7 @@ export class PortalComponent implements OnInit, OnDestroy {
}
}

onDeactivateEditorWidget() {
onDeactivateWorkspaceWidget() {
this.closeToastPanel();
}

Expand Down
8 changes: 4 additions & 4 deletions src/app/pages/portal/portal.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { IgoCoreModule } from '@igo2/core';
import {
IgoActionModule,
IgoEditionModule,
IgoWorkspaceModule,
IgoEntityModule,
IgoPanelModule,
IgoBackdropModule,
Expand All @@ -20,7 +20,7 @@ import {
} from '@igo2/common';

import {
IgoGeoEditionModule,
IgoGeoWorkspaceModule,
IgoFeatureModule,
IgoImportExportModule,
IgoMapModule,
Expand Down Expand Up @@ -54,9 +54,9 @@ import { PortalComponent } from './portal.component';
IgoQueryModule.forRoot(),
IgoSearchModule.forRoot(),
IgoActionModule,
IgoEditionModule,
IgoWorkspaceModule,
IgoEntityModule,
IgoGeoEditionModule,
IgoGeoWorkspaceModule,
IgoPanelModule,
IgoToolModule,
IgoBackdropModule,
Expand Down
6 changes: 3 additions & 3 deletions src/app/pages/portal/sidenav/sidenav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
matTooltipShowDelay="500"
[matTooltip]="'igo.context.sidenav.mainMenu' | translate"
(click)="onUnselectButtonClick()">
<mat-icon>home</mat-icon>
<mat-icon svgIcon="home"></mat-icon>
</button>

<igo-panel [title]="title$ | async | translate">
Expand All @@ -25,7 +25,7 @@
matTooltipShowDelay="500"
[matTooltip]="'igo.context.sidenav.goBack' | translate"
(click)="onPreviousButtonClick()">
<mat-icon>arrow_back</mat-icon>
<mat-icon svgIcon="arrow-left"></mat-icon>
</button>

<!-- <button *ngIf="toolbox.activeTool$ | async"
Expand All @@ -35,7 +35,7 @@
matTooltipShowDelay="500"
[matTooltip]="'igo.context.sidenav.mainMenu' | translate"
(click)="onUnselectButtonClick()">
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button> -->

<igo-toolbox
Expand Down
Binary file removed src/fonts/MaterialIcons-Regular.eot
Binary file not shown.
Binary file removed src/fonts/MaterialIcons-Regular.ttf
Binary file not shown.
Binary file removed src/fonts/MaterialIcons-Regular.woff
Binary file not shown.
Binary file removed src/fonts/MaterialIcons-Regular.woff2
Binary file not shown.

0 comments on commit 0758af4

Please sign in to comment.