Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) update dll & label shape & background (Read 12602 times)
08804139
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Oct 15th, 2018
Re: update dll & label shape & background
Reply #15 - Jun 10th, 2019 at 7:55am
Print Post  
Hello
Code Client side :
<ndiag:Ruler runat="server" ID="ruler" Unit="Centimeter" >
<ndiag:DiagramView ID="canvasView" runat="server" ClientSideMode="Canvas"
Height="600" EnterInplaceEditScript="OnEnterInplaceEditScript"
Diagram-AlignToGrid="true"
AllowInplaceEdit="true"
AppletStartedScript="onLoaded" NodeSelectedScript="onNodeSelected" NodeDeselectedScript="onNodeSelected"
ClickedScript="canvas_Clicked" JsLibraryLocation="MindFusion.Diagramming.js"
NodeCreatedScript="onNodeCreated"
Diagram-ShowGrid="true"
Diagram-LinkTextStyle="Follow"
Diagram-LinkCrossings="Cut"
NodeClickedScript="NodeClickedScript" LinkClickedScript="OnLinkClickedScript"
LinkCreatedScript="onLinkCreated" NodeSelectingScript="OnNodeSelectingScript">
</ndiag:DiagramView>
</ndiag:Ruler>
Script :
function onLoaded(sender) {
debugger;
if (Tb_ModeDesignClient.GetText() == "BATIMENT") {
diagram.setMeasureUnit(MindFusion.Drawing.GraphicsUnit.Centimeter);
}

If I add the above code on the client side a diagram display problem is displayed
« Last Edit: Jun 10th, 2019 at 9:28am by 08804139 »  

Diag.png ( 27 KB | 226 Downloads )
Diag.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: update dll & label shape & background
Reply #16 - Jun 10th, 2019 at 9:29am
Print Post  
Is that diagram variable actually set? Try calling sender.setMeasureUnit(...);
  
Back to top
 
IP Logged
 
08804139
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Oct 15th, 2018
Re: update dll & label shape & background
Reply #17 - Jun 10th, 2019 at 11:38am
Print Post  
I found the bug. the problem appears when I add the following code (server side) :
var node1 = new OrgChartNode();
node1.Bounds = new RectangleF(0, 0, 1000, 1000);
node1.Image = @"/fond.png";
node1.Id = "Fond";
node1.ZIndex = -1;
canvas.Nodes.Add(node1);

------
I used this code to insert a background image at the position (0,0) in relation to the ruler.
I want insert nodes in positions with the code.
for example
the number 1 presents the bottom of the diagram
the number 2 presents the background image that I want to position in the coordinates (0,0)
the number 3 presents the image that I want to position in the coordinates (7,4)
number 4 presents the image that I want to position in the coordinates (9,2)

how can I achieve a result as shown in this attached image.
  

diagramme_001.png ( 20 KB | 201 Downloads )
diagramme_001.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: update dll & label shape & background
Reply #18 - Jun 11th, 2019 at 6:42am
Print Post  
You should be able to load an image by setting node.ImageUrl property to the relative URL string, e.g. see NetworkChart sample project. Alternatively set node.Image = new Bitmap(server_file_system_path), e.g. see LayeredLayout example.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint