From d323d9d6000c6fba5dc9a87d60ac0bab251a81e8 Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Mon, 3 Sep 2018 09:43:40 +0200 Subject: [PATCH] little animation improvements --- .../src/nls/components/graphs.component.ts | 3 ++- .../src/nls/directives/guilloche.directive.ts | 2 +- src/environments/environment.prod.ts | 3 ++- src/environments/environment.ts | 10 +++++----- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/projects/nls-guilloche/src/nls/components/graphs.component.ts b/projects/nls-guilloche/src/nls/components/graphs.component.ts index f24b85e..4c1ffa4 100644 --- a/projects/nls-guilloche/src/nls/components/graphs.component.ts +++ b/projects/nls-guilloche/src/nls/components/graphs.component.ts @@ -182,6 +182,7 @@ export class NlsGraphsComponent implements OnChanges { ); if (this.config.autoHeight) { + // Snap bottom and top to window limits return { start: { x: totalCenter.x - baseCenter.x, @@ -196,7 +197,7 @@ export class NlsGraphsComponent implements OnChanges { center: totalCenter }; } else { - + // Adjust matrix relatively to window size return { start: { x: totalCenter.x - baseCenter.x, diff --git a/projects/nls-guilloche/src/nls/directives/guilloche.directive.ts b/projects/nls-guilloche/src/nls/directives/guilloche.directive.ts index d3da917..f2606f7 100644 --- a/projects/nls-guilloche/src/nls/directives/guilloche.directive.ts +++ b/projects/nls-guilloche/src/nls/directives/guilloche.directive.ts @@ -28,7 +28,7 @@ import { NlsCanvasService } from './../services/canvas.service'; import { NlsMathService } from './../services/math.service'; import { NlsGraphService } from '../services/graph.service'; -const ANIMATION_INTERVAL = 60; +const ANIMATION_INTERVAL = 30; @Directive({ selector: '[nlsGuilloche]' diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 8f0cd88..75daade 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -22,7 +22,8 @@ export const environment = { colors: { secondary: '#F8485E', primary: '#5CC0C7' - } + }, + autoHeight: false }, formDefaults: { width: 10, diff --git a/src/environments/environment.ts b/src/environments/environment.ts index a8ddbcf..4975045 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -23,24 +23,24 @@ export const environment = { primary: '#129490', secondary: '#CE1483' }, - autoSize: true + autoHeight: true }, formDefaults: { - width: 1, + width: 1e-10, height: 1, scale: 0.4, - overlap: 0.6, + overlap: 0.3, vectors: { start: 1, end: 0, range: 0.6, spacing: 7 }, - nodes: 5, + nodes: 3, stroke: 0.7, spread: { amount: 30, - spacing: 10 + spacing: 20 } } };