Page History
...
- Use Raster to enable position-based selection over a fixed image such as seating maps or warehouse layouts; bind the background via
imageand make the grid visible withenableRaster. - Use for discrete, cell-level selections (not free-form drawing). Handle taps/clicks with
events.ON_RASTER_CLICKand persist/hand off selections usinggetData. - Keep the component present only when needed using
displayConditions(state-driven show/hide) orvisibilityPolicySetId(role-gated availability).
Sizing & Layout
- Size the drawing plane explicitly so the grid aligns with the image: set
rasterWidth/rasterHeightand define cell size withrectSize(square) orrectW/rectH(rectangular). - Prefer cell sizes that map cleanly to the underlying image scale to avoid misalignment and accidental multi-cell hits. Configure via
rectSizeorrectW/rectH. - Add outer breathing room only via the component’s own
paddingClass.
States & Feedback
- Represent selection state with the visual tokens: use
rectBackgroundColorfor selected cells and ensure any cell text remains readable viatextColor. - Expose/Hide grid lines to indicate mode shifts (e.g., view vs. select) using
toggleRasterOn/toggleRasterOff; read current mode withgetRasterState.
Color & Contrast
- Ensure axis labels are legible over the image by choosing an
axisTextColorwith sufficient contrast against the background. - Maintain readable selection overlays by pairing
rectBackgroundColorwith a contrastingtextColor. - On busy images, turn grid lines on (
toggleRasterOn) to aid targeting.
Visibility & Authorization
- Gate visibility by role/policy using
visibilityPolicySetId. - Use
displayConditionsto show/hide based on page state (e.g., show only after an image is available or a location is selected).
Content & Localization
- Name the component clearly for authors via
displayNameso it’s easy to find and maintain in large structures.
...