Disabling the border of the selected node when drag and drop from one node to another

basically ,i have 2 canvas in a page , one is Tab-palette containing nodes and canvas .
when i drag and drop a node from the tab-palette to canvas, the node which is dragged from the tab-palette is selected having blue border , and it remains even after dropping
so how do i remove or hide that border after dropping .

“Blue border” sounds like you are referring to the selected node in the Palette. Is that the case?

If so, you could implement an “ExternalObjectsDropped” DiagramEvent listener that cleared the selection of the Palette. For example, in your canvas Diagram’s initialization:

  var myDiagram = $(go.Diagram, . . .,
    { . . .,
      "ExternalObjectsDropped": function(e) {

  var myPalette = $(go.Palette, . . .);

actually the problem is that my palette component and diagram is in a seperate file and we have a event like
let draggedPartsIterator = e.subject.iterator;
let draggedPart = draggedPartsIterator.value;
let draggedPartData = draggedPart.data;
//console.log('draggedPart is ',{…draggedPartData});
//let newNodeName = getNewName(‘Node’,draggedPartData);
if(draggedPartData.nodeType && draggedPartData.nodeType==“Sub Template”){
let subTemplateNode = draggedPartData;
draggedPartData.isDragged = true;
let newNodeKey = getNewKey(‘Node’,draggedPartData);
if(!draggedPartData.category || (draggedPartData.category && draggedPartData.category.toLowerCase() != ‘labels’)) setCustomLabelForNode(draggedPartData,newNodeKey);



so how to give

Oh, OK, so you are already looking at the dropped node data by iterating through the collection of dropped nodes and looking at each Node.data.

So is the problem that the selected node(s) in the Palette are still showing the standard blue selection Adornment? If you cannot refer to the Palette from the Diagram’s “ExternalObjectsDropped” DiagramEvent listener, then I suppose you could set Part.selectionAdorned to false on the node template(s) in the Palette.

Or else implement some sort of listener to call Diagram.clearSelection after anyone has dragged something from the Palette. If that’s what you want, I can tell you after I’ve tried it.