Skip to content

Commit

Permalink
Cleaning samples
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudleclerc committed Mar 8, 2021
1 parent 2da982a commit 8f42134
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 141 deletions.
129 changes: 69 additions & 60 deletions samples/AzureMapsControl.Sample/Pages/Animations/AnimationBar.razor
Original file line number Diff line number Diff line change
@@ -1,62 +1,71 @@
@namespace AzureMapsControl.Sample.Animations

<div class="animations-btns">
<button class="btn btn-primary" @onclick="DisposeAsync">Dispose</button>
<button class="btn btn-primary" @onclick="PauseAsync">Pause</button>
<button class="btn btn-primary" @onclick="PlayAsync">Play</button>
<button class="btn btn-primary" @onclick="ResetAsync">Reset</button>
<button class="btn btn-primary" @onclick="SeekAsync">Seek 0.5</button>
<button class="btn btn-primary" @onclick="StopAsync">Stop</button>
</div>

@code {

[Parameter]
public EventCallback OnDispose { get; set; }

[Parameter]
public EventCallback OnPause { get; set; }

[Parameter]
public EventCallback OnPlay { get; set; }

[Parameter]
public EventCallback OnReset { get; set; }

[Parameter]
public EventCallback OnSeek { get; set; }

[Parameter]
public EventCallback OnStop { get; set; }

public async Task DisposeAsync(MouseEventArgs e)
{
await OnDispose.InvokeAsync();
}

public async Task PauseAsync(MouseEventArgs e)
{
await OnPause.InvokeAsync();
}


public async Task PlayAsync(MouseEventArgs e)
{
await OnPlay.InvokeAsync();
}

public async Task ResetAsync(MouseEventArgs e)
{
await OnReset.InvokeAsync();
}

public async Task SeekAsync(MouseEventArgs e)
{
await OnSeek.InvokeAsync();
}

public async Task StopAsync(MouseEventArgs e)
{
await OnStop.InvokeAsync();
}
}
<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

<div class="animations-btns">
<button class="btn btn-primary" @onclick="DisposeAsync">Dispose</button>
<button class="btn btn-primary" @onclick="PauseAsync">Pause</button>
<button class="btn btn-primary" @onclick="PlayAsync">Play</button>
<button class="btn btn-primary" @onclick="ResetAsync">Reset</button>
<button class="btn btn-primary" @onclick="SeekAsync">Seek 0.5</button>
<button class="btn btn-primary" @onclick="StopAsync">Stop</button>
</div>

@code {

[Parameter]
public EventCallback OnDispose { get; set; }

[Parameter]
public EventCallback OnPause { get; set; }

[Parameter]
public EventCallback OnPlay { get; set; }

[Parameter]
public EventCallback OnReset { get; set; }

[Parameter]
public EventCallback OnSeek { get; set; }

[Parameter]
public EventCallback OnStop { get; set; }

public async Task DisposeAsync(MouseEventArgs e)
{
await OnDispose.InvokeAsync();
}

public async Task PauseAsync(MouseEventArgs e)
{
await OnPause.InvokeAsync();
}


public async Task PlayAsync(MouseEventArgs e)
{
await OnPlay.InvokeAsync();
}

public async Task ResetAsync(MouseEventArgs e)
{
await OnReset.InvokeAsync();
}

public async Task SeekAsync(MouseEventArgs e)
{
await OnSeek.InvokeAsync();
}

public async Task StopAsync(MouseEventArgs e)
{
await OnStop.InvokeAsync();
}
}
9 changes: 0 additions & 9 deletions samples/AzureMapsControl.Sample/Pages/Animations/Drop.razor
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/Drop"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
<AzureMap Id="map"
CameraOptions="new CameraOptions { Center = new Components.Atlas.Position(-122.33825, 47.53945), Zoom = 7 }"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/DropMarkers"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
<AzureMap Id="map"
CameraOptions="new CameraOptions { Center = new Components.Atlas.Position(-122.33825, 47.53945), Zoom = 7 }"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/GroupAnimations"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
<AzureMap Id="map"
CameraOptions="new CameraOptions { Center = new Components.Atlas.Position(-122.33825, 47.53945), Zoom = 7 }"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/MoveAlongPath"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
@using AzureMapsControl.Sample.Animations
<AnimationBar OnDispose="DisposeAsync"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/MoveMarkerAlongPath"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
@using AzureMapsControl.Sample.Animations
<AnimationBar OnDispose="DisposeAsync"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/MovingDashedLine"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
@using AzureMapsControl.Sample.Animations
<AnimationBar OnDispose="DisposeAsync"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/SetCoordinates"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
@using AzureMapsControl.Sample.Animations
<AnimationBar OnDispose="DisposeAsync"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/SetMarkerCoordinates"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
@using AzureMapsControl.Sample.Animations
<AnimationBar OnDispose="DisposeAsync"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
@page "/Animations/Snakeline"
@inject Components.Animations.IAnimationService AnimationService

<style>
.animations-btns {
position: absolute;
z-index: 1000;
left: 0;
top: 0;
}
</style>

@using AzureMapsControl.Components.Map
@using AzureMapsControl.Sample.Animations
<AnimationBar OnDispose="DisposeAsync"
Expand Down

0 comments on commit 8f42134

Please sign in to comment.