18 lines
3.0 KiB
Plaintext
18 lines
3.0 KiB
Plaintext
@model WritingContextMapViewModel
|
||
@using System.Text.Json
|
||
<div data-writing-component-fragment>
|
||
<button type="button" class="btn btn-link btn-sm float-end" data-context-refresh title="Read updated saved information; does not request AI">Refresh saved data</button>
|
||
@if(Model.Document==null){<p>No story maps are saved for this project. The Maps workspace can hold your locations and their relationships.</p>}
|
||
else{
|
||
<div class="writing-chart-controls"><label>Map <select class="form-select form-select-sm" data-context-map-choice>@foreach(var map in Model.Maps){<option value="@map.MapID" selected="@(map.MapID==Model.Document.Map.MapID)">@map.Name</option>}</select></label><label>Lens <select class="form-select form-select-sm" data-context-map-lens data-writing-view-state="context-map-lens"><option value="scene">Scene location</option><option value="people">Scene participants</option><option value="plots">Plot Line locations</option><option value="all">All saved places</option></select></label></div>
|
||
<p class="small" data-context-map-location>@(Model.Position?.FeatureID.HasValue==true?$"Saved scene location: {Model.Position.LocationName} · {Model.Position.Status}":"The scene has no reliably mapped location yet. You can still explore this saved map.")</p>
|
||
<div class="writing-chart-controls"><button type="button" class="btn btn-outline-secondary btn-sm" data-context-map-fit>Fit map</button><button type="button" class="btn btn-outline-secondary btn-sm" data-context-map-focus disabled="@(Model.Position?.FeatureID==null)">Show scene location</button><button type="button" class="btn btn-outline-secondary btn-sm" data-context-map-zoom=".8" aria-label="Zoom in">+</button><button type="button" class="btn btn-outline-secondary btn-sm" data-context-map-zoom="1.25" aria-label="Zoom out">−</button></div>
|
||
<p class="small text-muted">Saved places and location relationships. Drag to pan; selecting a place explores the map without moving Word.</p>
|
||
<svg class="writing-context-map" data-context-map-canvas data-writing-view-state="map-viewport-@Model.Document.Map.MapID" role="img" aria-label="@Model.Document.Map.Name saved map" tabindex="0"></svg>
|
||
<label>Inspect place <select class="form-select form-select-sm" data-context-map-feature data-writing-view-state="map-feature-@Model.Document.Map.MapID"><option value="">Choose a placed feature</option>@foreach(var feature in Model.Document.Features.Where(f=>f.IsPlaced)){<option value="@feature.FeatureID">@feature.Name</option>}</select></label>
|
||
<p class="small mt-2" data-context-map-detail>Select a place to inspect its saved relationships.</p>
|
||
<a href="/Maps?projectId=@Model.ProjectID&id=@Model.Document.Map.MapID" target="_blank" rel="noopener" class="btn btn-outline-secondary btn-sm">Open full Maps workspace</a>
|
||
<script type="application/json" data-context-map-data>@Html.Raw(JsonSerializer.Serialize(new{document=Model.Document,story=Model.Story,position=Model.Position,sceneID=Model.SceneID,projectID=Model.ProjectID},new JsonSerializerOptions(JsonSerializerDefaults.Web)))</script>
|
||
}
|
||
</div>
|