You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use `SKDeepZoomController` with a plain `SKCanvasView` to render Deep Zoom images in Blazor WebAssembly. There is no custom component — the page wires the services directly to the canvas.
3
+
Use `SKDeepZoomController` with a plain `SKCanvasView`in Blazor WebAssembly to render Deep Zoom images. There is no custom component — the page wires the services directly to the canvas, giving you full control over layout, interaction, and lifecycle.
@@ -59,7 +56,7 @@ Use `SKDeepZoomController` with a plain `SKCanvasView` to render Deep Zoom image
59
56
60
57
## Serving Tile Assets
61
58
62
-
Place `.dzi` and tile folder under `wwwroot`. In the project file, reference them as content:
59
+
Place `.dzi` and tile folder under `wwwroot`. In the project file, mark them as content:
63
60
64
61
```xml
65
62
<ItemGroup>
@@ -68,16 +65,98 @@ Place `.dzi` and tile folder under `wwwroot`. In the project file, reference the
68
65
</ItemGroup>
69
66
```
70
67
71
-
The `SKDeepZoomHttpTileFetcher` fetches each tile URL via `HttpClient`; tile URLs are constructed automatically from the base URL you supply to `SKDeepZoomImageSource.Parse`.
68
+
The `SKDeepZoomHttpTileFetcher` fetches each tile via `HttpClient`; tile URLs are constructed automatically from the base URL you pass to `SKDeepZoomImageSource.Parse`.
69
+
70
+
## Pan and Zoom
71
+
72
+
Wire mouse and touch events to the controller's navigation methods:
See the [Caching docs](deep-zoom-caching.md) for implementing browser storage tiers, delay wrappers, and other custom strategies.
135
+
136
+
## Canvas Resize
137
+
138
+
When the Blazor page resizes, `SetControlSize` automatically picks up the new dimensions on the next paint. If you want to trigger a reset to fit the image after a resize:
139
+
140
+
```csharp
141
+
// In a JS interop resize callback:
142
+
[JSInvokable]
143
+
publicvoidOnCanvasResized()
144
+
{
145
+
_controller?.ResetView();
146
+
InvokeAsync(() =>_canvas?.Invalidate());
147
+
}
148
+
```
72
149
73
150
## Rendering Behaviour
74
151
75
-
-**Fit and center**: On load the controller calls `FitToView()`so the full image is visibleand centered in the canvas. Neither cropping nor distortion occurs.
76
-
-**Tile resolution**: `Update()` selects the pyramid level whose tile size best matches the physical pixel dimensions of the canvas. Only visible tiles are requested.
77
-
-**Tile blending**: While high-resolution tiles are in-flight, parent-level tiles are upscaled and drawn as placeholders.
152
+
-**Fit and center**: On load the controller calls `FitToView()`— the full image is visible, centered horizontally and vertically, with aspect ratio preserved. No cropping or distortion.
153
+
-**LOD blending**: While high-resolution tiles are in-flight, lower-resolution parent tiles are upscaled and composited as placeholders.
154
+
-**Idle detection**: `controller.IsIdle` is `true` when no tiles are loading. You can pause periodic repaints when the view is idle.
78
155
79
156
## Related
80
157
81
-
-[Deep Zoom overview](deep-zoom.md) — architecture, services, and API reference
82
-
-[Deep Zoom for MAUI](deep-zoom-maui.md) — .NET MAUI integration
0 commit comments