Skip to content
Open
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
55 changes: 55 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
"@saehrimnir/druidjs": "^0.7.3",
"d3": "^7.9.0",
"d3-force": "^3.0.0",
"driver.js": "^1.4.0",
"material-icons": "^1.13.14",
"pyodide": "^0.28.0",
"rxjs": "~7.8.0",
"shepherd.js": "^15.2.2",
"three": "^0.176.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
Expand Down Expand Up @@ -68,4 +70,4 @@
"prettier --write"
]
}
}
}
56 changes: 54 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { Component, HostListener, OnInit } from '@angular/core';
import { Component, HostListener, OnInit, AfterViewInit, ViewChild } from '@angular/core';
import { ConfigService } from './services/config.service';
import { GlyphCanvasComponent } from './canvas/glyph-canvas.component';
import { DataLoaderService } from './services/data-loader.service';
import { checkTextInput } from './shared/helpers/angular-helper';
import { MenuBarComponent } from './menubar/menubar.component';
import { ToastComponent } from './shared/components/toast/toast.component';
import { SidebarComponent } from './sidebar/sidebar.component';
import { driver } from 'driver.js';
import 'driver.js/dist/driver.css';
import Shepherd from 'shepherd.js';
import 'shepherd.js/dist/css/shepherd.css';

interface GlyphCanvasItem {
id: number;
Expand All @@ -20,8 +24,9 @@ interface GlyphCanvasItem {
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
})
export class AppComponent implements OnInit {
export class AppComponent implements OnInit, AfterViewInit {
title = 'Glyphboard Royale';
@ViewChild(GlyphCanvasComponent) glyphCanvas!: GlyphCanvasComponent;

grid: GlyphCanvasItem[] = [];
totalCells = 1;
Expand Down Expand Up @@ -52,6 +57,53 @@ export class AppComponent implements OnInit {
});
}

ngAfterViewInit() {
const driverObj = driver({
showProgress: true,
onDestroyStarted: () => {
this.glyphCanvas.tutorialActive = false;
driverObj.destroy();
},
steps: [
{
element: '[data-tour="data-menu"]',
popover: {
title: 'Schritt 1: Datensatz auswählen',
description: 'Über dieses Menü kann zwischen Datensätzen gewechselt werden.',
side: 'bottom',
},
},
{
element: '[data-tour="glyph-type"]',
popover: {
title: 'Schritt 2: Glyph-Typ wechseln',
description: 'Hier kann die Darstellungsform der Glyphen geändert werden.',
side: 'left',
},
},
{
element: '[data-tour="legend"]',
popover: {
title: 'Schritt 3: Legende verstehen',
description: 'Die Legende zeigt, welche Datenattribute über Farben und Formen dargestellt werden.',
side: 'left',
},
},
{
element: '[data-tour="legend"]',
popover: {
title: 'Schritt 4: Filter nutzen',
description: 'Nutze die Filter, um bestimmte Datenbereiche gezielt hervorzuheben.',
side: 'left',
},
},
],
});

this.glyphCanvas.tutorialActive = true;
driverObj.drive();
}

getNextFreeId(grid: GlyphCanvasItem[]): number {
const usedIds = new Set(grid.map(item => item.id));

Expand Down
2 changes: 1 addition & 1 deletion src/app/canvas/glyph-canvas.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
>
<app-magiclens [container]="canvasContainer" [glyphGroup]="rendererSvc.glyphGroup" [parentId]="id"></app-magiclens>
<app-navigationcontrols
[visible]="mouseInside"
[visible]="mouseInside || tutorialActive"
[selectionMode]="selectionSvc.selectionMode"
[magicLenseStatus]="magicLenseStatus"
(toggleNavigation)="toggleNavigationMode()"
Expand Down
1 change: 1 addition & 0 deletions src/app/canvas/glyph-canvas.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export class GlyphCanvasComponent implements AfterViewInit, OnDestroy, OnChanges
private lastHitTestTime = 0;
lastMousePosition = new THREE.Vector2();
mouseInside = false;
tutorialActive = false;
private mouseIdleTimer: ReturnType<typeof setTimeout> | undefined;
private mouseDownTime = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/app/menubar/menubar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- CENTER -->
<div class="menu-center">
<!-- DATA -->
<div class="data-control">
<div class="data-control" data-tour="data-menu">
<span class="label">Data</span>
<div class="dataset-selector">
<select [(ngModel)]="selectedDataset" (ngModelChange)="onDatasetSelect($event)">
Expand Down
2 changes: 2 additions & 0 deletions src/app/sidebar/sidebar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div class="activity-strip">
<button
class="strip-btn"
data-tour="legend"
[class.active]="!collapsed && activePane === 'encoding'"
(click)="selectPane('encoding')"
title="Encoding"
Expand All @@ -10,6 +11,7 @@
</button>
<button
class="strip-btn"
data-tour="glyph-type"
[class.active]="!collapsed && activePane === 'style'"
(click)="selectPane('style')"
title="Style"
Expand Down