Diagram isReadonly = true but still able to edit things

I’m using the Angular wrapper, so I have this code :

public ngDoCheck(): void {
    if (this.myDiagramComponent && this.myDiagramComponent.diagram instanceof go.Diagram) {
      this.myDiagramComponent.diagram.grid.visible = this.showGrid;
      this.myDiagramComponent.diagram.isReadOnly = this.isReadOnly;
      this.myDiagramComponent.diagram.isModelReadOnly = this.isReadOnly;

It becomes readonly, except that when I select a node, I can click on the arrow of the adornment. Is this not supposed to become readonly too ?

Yes, you’ll need to change the behavior in your app. In fact, you might not want to show that adornment at all in read-only mode.

hum…ok but is there a way to prevent the adornment from being displayed ?
Would it be in the definition below ? Or at runtime ?

 dia.nodeTemplate.selectionAdornmentTemplate =
      $(go.Adornment, 'Spot',
        $(go.Placeholder, { padding: 10 }),
        makeArrowButton(go.Spot.Top, 'TriangleUp'),
        makeArrowButton(go.Spot.Left, 'TriangleLeft'),
        makeArrowButton(go.Spot.Right, 'TriangleRight'),
        makeArrowButton(go.Spot.Bottom, 'TriangleDown'),
        CMButton({ alignment: new go.Spot(0.75, 0) })

The easiest thing would be to set Part.selectionAdorned to false, but you might not want that behavior because the user might not be able to tell when the node is selected unless there are other adornments shown. But if there are no other adornments when selected, you could still show the selection in other ways.

yes, this seems to work with Part.selectionAdorned set to false. There is another one for selected nodes, so that’s not an issue. Thanks