Add SKTouchCanvasView Blazor library with touch event support#357
Add SKTouchCanvasView Blazor library with touch event support#357
Conversation
Extract touch event support from PR #352 into a new SkiaSharp.Extended.UI.Blazor Razor Class Library. Includes SKTouchAction, SKTouchDeviceType, SKTouchEventArgs, and SKTouchCanvasView component with JS interop for pointer events. Adds a Touch demo page to the Blazor sample with drawing pad, touch action counters, and device type detection. Includes 15 unit tests for event args and MAUI-compatible enum values. Updates solution filters (Pack/Test) and multi-targets net9.0;net10.0. Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
|
@copilot please make the demo be a single canvas. Maybe we can have different colors for different device types. Also, we can log the action types as well as have counted for each action. Also, please maybe record a gif of you interacting with the canvas. I want to see an aesthetic stroke. |
… and event log Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
Consolidated into a single canvas in 284fa9a. Strokes are now colored by device type (blue=Mouse, coral=Touch, green=Stylus), with action counters, device counters, and a live event log below the canvas. I'm unable to record an animated GIF from this sandboxed environment — you'd need to interact with the running sample at |
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
|
@copilot blazor fails to load
|
GitHub Pages uses Jekyll by default, which ignores directories starting with underscore (like _framework). Adding .nojekyll to the root of the gh-pages branch disables Jekyll processing so blazor.webassembly.js and other files in _framework are served correctly. Applied to all three deployment paths: - Main site build (docs/_site/.nojekyll in artifact) - Same-repo PR staging deploy - Fork PR staging deploy Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
The 404 on |
…tory GitHub Pages uses Jekyll by default which strips directories starting with underscore (like _framework). A .nojekyll file disables this behavior, which is required for Blazor WASM apps to load correctly. Changes copied from PR #357: - docs-deploy.yml: touch docs/_site/.nojekyll in build step - docs-deploy.yml: touch .nojekyll + git add in staging deploy - docs-deploy-fork-pr.yml: touch .nojekyll + git add in staging deploy Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
|
@copilot clicking/touching and dragging on the canvas does not draw lines. |
|
@copilot navigating away from the touch page resukts in an error but all other pages are fine: |
* Initial plan * Add .nojekyll fixes to prevent Jekyll from stripping _framework directory GitHub Pages uses Jekyll by default which strips directories starting with underscore (like _framework). A .nojekyll file disables this behavior, which is required for Blazor WASM apps to load correctly. Changes copied from PR #357: - docs-deploy.yml: touch docs/_site/.nojekyll in build step - docs-deploy.yml: touch .nojekyll + git add in staging deploy - docs-deploy-fork-pr.yml: touch .nojekyll + git add in staging deploy Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
…ing and navigation - Copy all source files from PR #357: SKTouchCanvasView component, touch types, JS interop, tests, Touch demo page, nav menu updates, solution/filter updates - Fix touch/mouse dragging not drawing: auto-invalidate canvas after handled touch events in SKTouchCanvasView.OnPointerEvent - Fix ResizeObserver error on navigation: don't manually dispose inner SKCanvasView (let Blazor manage its lifecycle) - Add setPointerCapture on pointerdown for reliable drag tracking Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>

source/SkiaSharp.Extended.UI.Blazor/library with touch types only (no gesture view, no SKCanvasView wrapper).nojekyllto gh-pages root (disables Jekyll which strips_framework/dirs)💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.