Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Shadow Color for Composite Node ! (Read 1261 times)
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 270
Location: Bangalore, India
Joined: Jan 18th, 2019
Shadow Color for Composite Node !
Aug 28th, 2019 at 1:41pm
Print Post  
Hi,

I've defined a composite node like below and trying to set shadow color. But it doesn't seems working for composite node. May I know why? Working fine for ShapeNode.

private createNodes() {

this.DiagramNode = CompositeNode.classFromTemplate("DiagramNode",
{
component: "GridPanel",
rowDefinitions: ["*"],
columnDefinitions: ["22", "*"],
children:
[
{
component: "Rect",
name: "Background",
pen: "black",
brush: "white",
columnSpan: 2,
},
{
component: "Image",
name: "Image",
autoProperty: true,
location: "ceo.png",
margin: "1",
imageAlign: "Fit"
},
{
component: "StackPanel",
orientation: "Vertical",
gridColumn: 1,
margin: "1",
verticalAlignment: "Near",
children:
[
{
component: "Text",
name: "Title",
autoProperty: true,
text: "",
font: "Arial bold 20",
padding: "10,0,1,0"
},
{
component: "Text",
name: "FullName",
autoProperty: true,
text: "full name",
pen: "blue",
font: "Arial 20",
padding: "10,10,10,0"
}
]
}
]
});
var node = new this.DiagramNode();
node.setBounds(new Rect(100, 200, 200, 50));
node.setFullName("Composite node")
node.setTooltip("Composite node");
(node as any).setShadowColor("blue");
this.diagram.addItem(node);


var node1 = this.diagram.getFactory().createShapeNode(new Rect(500, 200, 150, 50));
node1.setText("Shape node");
node1.setFont(new Font("Arial", 20, false, false, false));
node1.setBrush("white");
node1.setShadowColor("blue");
node1.setTooltip("Shape node");
this.diagram.addItem(node1);
}

Regards,
Kannan
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Shadow Color for Composite Node !
Reply #1 - Aug 28th, 2019 at 7:36pm
Print Post  
Apparently CompositeNode does not apply shadows to any of the components automatically. You could show one for the background rectangle like this -

Code
Select All
node.setShadowColor("blue");
node.getComponent("Background").shadow = node.createShadow();
 



Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 270
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Shadow Color for Composite Node !
Reply #2 - Aug 29th, 2019 at 3:41am
Print Post  
It works  Smiley Thank you Slavcho  Cheesy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint