little animation improvements
This commit is contained in:
@@ -182,6 +182,7 @@ export class NlsGraphsComponent implements OnChanges {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (this.config.autoHeight) {
|
if (this.config.autoHeight) {
|
||||||
|
// Snap bottom and top to window limits
|
||||||
return {
|
return {
|
||||||
start: {
|
start: {
|
||||||
x: totalCenter.x - baseCenter.x,
|
x: totalCenter.x - baseCenter.x,
|
||||||
@@ -196,7 +197,7 @@ export class NlsGraphsComponent implements OnChanges {
|
|||||||
center: totalCenter
|
center: totalCenter
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
// Adjust matrix relatively to window size
|
||||||
return {
|
return {
|
||||||
start: {
|
start: {
|
||||||
x: totalCenter.x - baseCenter.x,
|
x: totalCenter.x - baseCenter.x,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import { NlsCanvasService } from './../services/canvas.service';
|
|||||||
import { NlsMathService } from './../services/math.service';
|
import { NlsMathService } from './../services/math.service';
|
||||||
import { NlsGraphService } from '../services/graph.service';
|
import { NlsGraphService } from '../services/graph.service';
|
||||||
|
|
||||||
const ANIMATION_INTERVAL = 60;
|
const ANIMATION_INTERVAL = 30;
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[nlsGuilloche]'
|
selector: '[nlsGuilloche]'
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ export const environment = {
|
|||||||
colors: {
|
colors: {
|
||||||
secondary: '#F8485E',
|
secondary: '#F8485E',
|
||||||
primary: '#5CC0C7'
|
primary: '#5CC0C7'
|
||||||
}
|
},
|
||||||
|
autoHeight: false
|
||||||
},
|
},
|
||||||
formDefaults: {
|
formDefaults: {
|
||||||
width: 10,
|
width: 10,
|
||||||
|
|||||||
@@ -23,24 +23,24 @@ export const environment = {
|
|||||||
primary: '#129490',
|
primary: '#129490',
|
||||||
secondary: '#CE1483'
|
secondary: '#CE1483'
|
||||||
},
|
},
|
||||||
autoSize: true
|
autoHeight: true
|
||||||
},
|
},
|
||||||
formDefaults: {
|
formDefaults: {
|
||||||
width: 1,
|
width: 1e-10,
|
||||||
height: 1,
|
height: 1,
|
||||||
scale: 0.4,
|
scale: 0.4,
|
||||||
overlap: 0.6,
|
overlap: 0.3,
|
||||||
vectors: {
|
vectors: {
|
||||||
start: 1,
|
start: 1,
|
||||||
end: 0,
|
end: 0,
|
||||||
range: 0.6,
|
range: 0.6,
|
||||||
spacing: 7
|
spacing: 7
|
||||||
},
|
},
|
||||||
nodes: 5,
|
nodes: 3,
|
||||||
stroke: 0.7,
|
stroke: 0.7,
|
||||||
spread: {
|
spread: {
|
||||||
amount: 30,
|
amount: 30,
|
||||||
spacing: 10
|
spacing: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user