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