Type Alias: SetSceneInputCanvas()
SetSceneInputCanvas = (
canvas
) =>Promise
<void
>
Function
Designates which canvas should receive user interactions like click, drag, and zoom.
This action specifies which of your canvas views should respond to user input for controlling the camera. Only one canvas can accept interactions at a time, so this lets you choose which one should be the "primary" controller when you have multiple views.
Business value:
- Creates intuitive multi-view experiences where users know which view to interact with
- Enables switching between different interaction surfaces in complex interfaces
- Supports responsive designs where the active view might change based on screen size
- Prevents conflicting inputs when multiple product views are displayed
Parameters
canvas
The HTML canvas element that should receive user interactions
Returns
Promise
<void
>
Example
// Switch the active canvas when selecting a different view
document.getElementById('main-view-tab').addEventListener('click', () => {
const mainCanvas = document.getElementById('main-product-view');
window.mimeeqApp.actions.setSceneInputCanvas(mainCanvas);
});