How to disable shape click event binding with node in pallet?

I have a gojs pallet and a canvas,
the nodes have small image attached to it , and is clickable,

I want that in pallet this should be readonly, and once dropped on canvas, they must be editable.

How to achieve this feature ?

The most flexible solution is to use a different template in the Palette than in your target Diagram. This is often desirable because you really want to show them differently in the palette anyway.

Alternatively you could use the same template if you change your click event handler to be a no-op if the e.diagram instanceof go.Palette.

That’s exactly what i was looking for,

Thanks a ton Walter.

You’re a magician in GoJS :slight_smile: