Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ngAfterViewInit(): void {
this.myDiagram = this.$(go.Diagram, this.div.nativeElement,
{
initialContentAlignment: go.Spot.Center,
padding: 10,
isReadOnly: false,
'animationManager.isEnabled': false, // disable Animation
'allowVerticalScroll': false, // no vertical scroll for diagram
'toolManager.mouseWheelBehavior': go.ToolManager.WheelNone // do not zoom diagram on wheel scroll
});
this.myDiagram.addLayerBefore(this.$(go.Layer, { name: 'red' }), this.myDiagram.findLayer('Grid'));
this.myDiagram.addLayerBefore(this.$(go.Layer, { name: 'green' }), this.myDiagram.findLayer('Grid'));
let commonToolTip = this.$(go.Adornment, 'Auto',
{
isShadowed: true
},
this.$(go.Shape, { fill: '#FFFFCC' }),
this.$(go.Panel, 'Vertical',
{
margin: 3
},
this.$(go.TextBlock, // bound to node data
{
margin: 4, font: 'bold 12pt sans-serif'
},
new go.Binding('text')),
this.$(go.TextBlock, // bound to Adornment because of call to Binding.ofObject
new go.Binding('text', '',
ngAfterViewInit(): void {
this.myDiagram = this.$(go.Diagram, this.div.nativeElement,
{
initialContentAlignment: go.Spot.Center,
padding: 10,
isReadOnly: false,
'animationManager.isEnabled': false, // disable Animation
'allowVerticalScroll': false, // no vertical scroll for diagram
'toolManager.mouseWheelBehavior': go.ToolManager.WheelNone // do not zoom diagram on wheel scroll
});
this.myDiagram.addLayerBefore(this.$(go.Layer, { name: 'red' }), this.myDiagram.findLayer('Grid'));
this.myDiagram.addLayerBefore(this.$(go.Layer, { name: 'green' }), this.myDiagram.findLayer('Grid'));
let commonToolTip = this.$(go.Adornment, 'Auto',
{
isShadowed: true
},
this.$(go.Shape, { fill: '#FFFFCC' }),
this.$(go.Panel, 'Vertical',
{
margin: 3
},
this.$(go.TextBlock, // bound to node data
{
margin: 4, font: 'bold 12pt sans-serif'
},
new go.Binding('text')),
this.$(go.TextBlock, // bound to Adornment because of call to Binding.ofObject