Hi,
I have set below properties but it does not help me.
this.myDiagram.allowCopy = false;
this.myDiagram = this.make(go.Diagram, this.element.nativeElement,
{
initialContentAlignment: go.Spot.Center, // center the content
“toolManager.mouseWheelBehavior”: go.ToolManager.WheelZoom,
‘undoManager.isEnabled’: true, // enable undo & redo
"draggingTool.isCopyEnabled": false,
mouseOver: (e) => this.doMouseOver(e), // this event handler is defined below
click: (e) => this.doMouseOver(e) // this event handler is defined below
});
Please give your suggestion.
walter
May 25, 2018, 11:18am
#2
Did you set Diagram.allowCopy before replacing the whole Diagram ?
What properties have you set on the Node ?
What does your doMouseOver
function do?
Below is the my code sequence.
And doMouseOver just used to show tooltip.
this.myDiagram = this.make(go.Diagram, this.element.nativeElement,
{
initialContentAlignment: go.Spot.Center, // center the content
“toolManager.mouseWheelBehavior”: go.ToolManager.WheelZoom,
‘undoManager.isEnabled’: true, // enable undo & redo
“draggingTool.isCopyEnabled”: false,
mouseOver: (e) => this.doMouseOver(e), // this event handler is defined below
click: (e) => this.doMouseOver(e) // this event handler is defined below
});
var that = this;
this.myDiagram.addDiagramListener("ObjectSingleClicked", function (ev) {
that.GetTaskDetails(ev);
});
this.myDiagram.isReadOnly = false;
this.myDiagram.allowDrop = true;
this.myDiagram.allowDragOut = true;
this.myDiagram.allowReshape = true;
**this.myDiagram.allowCopy = false;**
this.myDiagram.allowMove = true;
this.myDiagram.allowZoom = true;
this.myDiagram.undoManager.isEnabled = true;
walter
May 25, 2018, 2:01pm
#4
A minor point about code style: you could have set all of those Diagram properties, and the “ObjectSingleClicked” DiagramEvent listener, in the initialization of the Diagram.
Please could show us a way to reproduce the problem? I’m unable to do so with the information that you’ve given so far.