fixed animation bugs
This commit is contained in:
@@ -116,7 +116,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown-divider mb-4"></div>
|
<div class="dropdown-divider mb-4"></div>
|
||||||
<button type="submit" class="btn btn-lg btn-primary btn-block" [disabled]="configForm.invalid">Aktualisieren</button>
|
<button type="submit" class="btn btn-lg btn-primary btn-block" [disabled]="configForm.invalid || animationActive">Aktualisieren</button>
|
||||||
<div class="dropdown-divider mt-4"></div>
|
<div class="dropdown-divider mt-4"></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -86,11 +86,11 @@ export class GuillocheDirective implements OnChanges, OnDestroy {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
this.bounces = this.initialNodes.map(node => {
|
this.bounces = this.initialNodes.map(node => {
|
||||||
const bounceStart = Math.round(Math.random() * 10) / 10;
|
const bounceStart = Math.round(Math.random() * 100) / 100;
|
||||||
const bounceAmplitude = Math.round(Math.random() * 100);
|
const bounceAmplitude = Math.round(Math.random() * 150);
|
||||||
return this.math.bounce(bounceStart, bounceAmplitude, 2);
|
return this.math.bounce(bounceStart, bounceAmplitude, 3);
|
||||||
});
|
});
|
||||||
this.animationInterval = setInterval(() => this.animateGraph(), 60);
|
this.animationInterval = setInterval(() => this.animateGraph(), 40);
|
||||||
} else {
|
} else {
|
||||||
if (this.animationInterval) {
|
if (this.animationInterval) {
|
||||||
this.bounce = null;
|
this.bounce = null;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export let ConfigForm: FormGroup = fb.group({
|
|||||||
])),
|
])),
|
||||||
}),
|
}),
|
||||||
nodes: fb.control('', Validators.compose([
|
nodes: fb.control('', Validators.compose([
|
||||||
Validators.min(1),
|
Validators.min(5),
|
||||||
Validators.max(10)
|
Validators.max(10)
|
||||||
])),
|
])),
|
||||||
scale: fb.control('', Validators.compose([
|
scale: fb.control('', Validators.compose([
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
grid: false,
|
debug: false,
|
||||||
guilloche: {
|
guilloche: {
|
||||||
colors: {
|
colors: {
|
||||||
primary: '#F8485E',
|
primary: '#F8485E',
|
||||||
@@ -34,7 +34,7 @@ export const environment = {
|
|||||||
range: 0.4,
|
range: 0.4,
|
||||||
spacing: 10
|
spacing: 10
|
||||||
},
|
},
|
||||||
nodes: 4,
|
nodes: 5,
|
||||||
stroke: 1,
|
stroke: 1,
|
||||||
spread: {
|
spread: {
|
||||||
amount: 10,
|
amount: 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user