Modern vs Legacy Annotations
Compare Modern and Legacy on the same drawing, then enable Modern and work with Count groups in your npm integration.
Legacy is the default. Modern changes how supported annotations look while you edit. You can switch modes without changing the saved annotations, their IDs, or their measurement values.
Open the workshop sample and select Side by side, then choose Count markers. Both viewers show the same six markers. Zoom in to see how their size changes in Legacy and stays fixed in Modern.
The screenshots show the same workshop plan at the same zoom with the Count group selected.
| Example | Legacy | Modern |
|---|---|---|
| Count | Native symbols scale with the drawing. Rings show selection. | Numbered disks stay the same size on screen. A badge shows the group total. |
| Area | Native measurement label and handles. | Measurement badge and modern vertex handles. |
| Rectangle | Native editing handles. | Circular corner handles and a connected rotation control for an editable rectangle. |
Return to Single view to edit the sample group and check its marker total.
- 1Choose Count markers. The sample starts with six markers.
- 2Choose Add markers, click once on a clear spot in the drawing, then choose Done. The sample total updates to seven markers.
- 3Switch between Legacy and Modern. The added marker stays in the same place and the group still has seven markers.
Use the Count tool when you want a new group with its own total.
- 1Choose Count in the annotation toolbar.
- 2Click the drawing once for each marker you want to place.
- 3Choose Finish to complete the new group. Choose Reset sample to discard demo edits and start again with the original six markers.
Mount the viewer and await viewer.ready(). Follow the Modern Annotations component to check for measurementAppearance and call viewer.styles.setMeasurementAppearance({ mode: "modern" }). Wait for the drawing to open before enabling Count controls.
Track the last confirmed mode in the parent. Disable the appearance control while the request is pending and show a retry action if Canvas rejects the switch.
Use the same Count Point Mode API in either appearance. Check for countWorkflow before enabling configuration and Finish. Check for countItemInfo before using the marker list.
- 1Create a group. Configure the draft and activate Count. Let the operator place markers before calling
count.finish(). Refresh the annotation list after Finish confirms. - 2Extend a group. Confirm the target is an editable native Count and use its GUID. Enable point mode, wait for Canvas to confirm it, then let the operator click the drawing.
- 3Verify and save. Stop point mode before switching appearance, changing the target, or leaving Count. Compare marker IDs and totals before and after insertion. If a request times out, refresh the group before retrying. Use your existing save workflow to persist edits.
- 4Clean up. Unsubscribe any Count listeners and destroy the viewer if the route owns it.
Start and finish a new group
Call Finish after the operator places the markers.
Add markers to an editable group
Use the selected Count group GUID as countGuid. Keep Start and Done in separate button handlers.
- Keep controls unavailable until Canvas and the sample drawing are ready. Indicate which appearance is active with an accessible label and pressed state.
- Allow one mode change at a time. Keep the last confirmed appearance visible while the request is pending and show an actionable error if the request fails.
- Finish a new Count group or stop marker insertion before switching. Verify that marker positions and totals survive the switch, and that a new viewer starts in Legacy.
- Verify keyboard focus, screen reader status announcements, and cleanup of listeners or outstanding requests when the user leaves the route.


