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) {
        myPalette.clearSelection();
      }
    });

  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
diagram.addDiagramListener(“ExternalObjectsDropped”,function(e){
let draggedPartsIterator = e.subject.iterator;
while(draggedPartsIterator.next()){
let draggedPart = draggedPartsIterator.value;
let draggedPartData = draggedPart.data;
LabelSubnet.clearSelection();
//console.log('draggedPart is ',{…draggedPartData});
//let newNodeName = getNewName(‘Node’,draggedPartData);
//setCustomNameForNode(draggedPartData,newNodeName);
if(draggedPartData.nodeType && draggedPartData.nodeType==“Sub Template”){
let subTemplateNode = draggedPartData;
if(subTemplateNode.subTemplateData)
subTemplate=JSON.parse(JSON.stringify(subTemplateNode));
}
else{
draggedPartData.isDragged = true;
let newNodeKey = getNewKey(‘Node’,draggedPartData);
setCustomKeyForNode(draggedPartData,newNodeKey);
if(!draggedPartData.category || (draggedPartData.category && draggedPartData.category.toLowerCase() != ‘labels’)) setCustomLabelForNode(draggedPartData,newNodeKey);
resetCustomDataInNode(draggedPartData,‘isDragged’,false);

		  }
	  }

  });

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.