- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.JavaScript pack. It includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are more details and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Pages: 1 2  Send Topic Print  
update dll & label shape & background
Read 3021 times

08804139   Offline
YaBB Newbies
*
Posts: 22
I Love MindFusion!


   
     
 
Re: update dll & label shape & background
Reply #15 - Jun 10th, 2019 at 8:55am
 
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 10:28am by 08804139 »

Diag.png (27 KB | 19 )
Diag.png
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1865
Gender: male
tech.support


   
     
 
Re: update dll & label shape & background
Reply #16 - Jun 10th, 2019 at 10:29am
 
Is that diagram variable actually set? Try calling sender.setMeasureUnit(...);
 
 
 
IP Logged    
 
     

08804139   Offline
YaBB Newbies
*
Posts: 22
I Love MindFusion!


   
     
 
Re: update dll & label shape & background
Reply #17 - Jun 10th, 2019 at 12:38pm
 
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 | 16 )
diagramme_001.png
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1865
Gender: male
tech.support


   
     
 
Re: update dll & label shape & background
Reply #18 - Jun 11th, 2019 at 7:42am
 
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
 
 
 
IP Logged    
 
     
Pages: 1 2  Send Topic Print