Skip to content

Commit

Permalink
Merge pull request #161 from DDtMM/19.x
Browse files Browse the repository at this point in the history
Fix #159
  • Loading branch information
DDtMM authored Dec 26, 2024
2 parents c3a8798 + c720dcb commit e98aa78
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions projects/demo/src/app/demo-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const DEMO_CONFIGURATIONS = [
name: 'springSignal',
page: () => import('./content/signal-factories/spring-signal-page.component').then(x => x.SpringSignalPageComponent),
route: 'spring-signal',
sourceUrl: 'signals/animation/spring-signal.ts',
sourceUrl: 'signals/animated/spring-signal.ts',
usages: ['generator', 'writableSignal']
},
{
Expand Down Expand Up @@ -242,7 +242,7 @@ export const DEMO_CONFIGURATIONS = [
name: 'tweenSignal',
page: () => import('./content/signal-factories/tween-signal-page.component').then(x => x.TweenSignalPageComponent),
route: 'tween-signal',
sourceUrl: 'signals/animation/tween-signal.ts',
sourceUrl: 'signals/animated/tween-signal.ts',
usages: ['generator', 'writableSignal']
}
] satisfies DemoConfigurationItem<string>[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->
<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->
<div class="flex flex-row gap-3 items-center pb-3">
<app-spring-options [(springOptions)]="$springOptions" (springOptionsChange)="$coords.setOptions($springOptions())" />
</div>
<div #target class="relative cursor-pointer w-36 h-36 bg-green-600 rounded-lg border-slate-900 border-solid border overflow-hidden"
(click)="setCords($event, target)"
(mousemove)="setCords($event, target)" >
<div class="w-4 h-4 bg-slate-900 rounded-full"
[ngStyle]="{ 'translate': $coords()[0] + 'px ' + $coords()[1] + 'px' }">
<div class="flex flex-col gap-3">
<div>Click the surface to update the 2D coordinates and see the spring animation.</div>
<div class="flex flex-row gap-3 items-center">
<app-spring-options [(springOptions)]="$springOptions" (springOptionsChange)="$coords.setOptions($springOptions())" />
</div>
<div #target class="relative cursor-pointer w-36 h-36 bg-green-600 rounded-lg border-slate-900 border-solid border overflow-hidden"
(click)="setCords($event, target)">
<div class="w-4 h-4 bg-slate-900 rounded-full"
[ngStyle]="{ 'translate': $coords()[0] + 'px ' + $coords()[1] + 'px' }">
</div>
<div class="text-sm absolute bottom-2 right-2 pointer-events-none">
({{$coords()[0] | number: '1.1-2'}}, {{$coords()[1] | number: '1.1-2'}})
</div>
</div>
<div class="text-sm absolute bottom-2 right-2 pointer-events-none">
({{$coords()[0] | number: '1.1-2'}}, {{$coords()[1] | number: '1.1-2'}})
</div>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { HomeBoxComponent } from '../controls/home-box.component';
template: `
<app-home-box fnName="springSignal">
<div>
Tween animations that allow a signal to transform between values over a set duration.
Animates changes to a signal's value with a realistic spring transition.
</div>
<div class="divider">Example</div>
<div class="flex flex-col w-full sm:flex-row items-center gap-3">
Expand Down

0 comments on commit e98aa78

Please sign in to comment.