The MindFusion Forums
Flow Diagramming Components >> ASP.NET >> update dll & label shape & background
https://mindfusion.eu/Forum/YaBB.pl?num=1545527726

Message started by 08804139 on Dec 23rd, 2018 at 1:15am

Title: update dll & label shape & background
Post by 08804139 on Dec 23rd, 2018 at 1:15am
HI,
I update my version demo deversion dll 5 to dll 6 to activate the rule in my project.
a lot of problematic appearance:
+my demo does not work with microsoft edge
+always the rule is not displayed
+in the palette how can I display the designation below the image
+if I add a background how I can put its width and height change depending on the zoom (adjustment)
here is an example demo test (default.aspx and c#)
thanks
https://mindfusion.eu/Forum/YaBB.pl?action=downloadfile;file=prob.rar ( 6 KB | 230 Downloads )

Title: Re: update dll & label shape & background
Post by Slavcho on Dec 24th, 2018 at 8:22am
Hi,

The Controls sample project works correctly for me under Edge, showing Ruler control too if that's what you mean by rule. I could not compile your example, our developers ill check it later.

Regards,
Slavcho
Mindfusion

Title: Re: update dll & label shape & background
Post by 08804139 on Dec 24th, 2018 at 12:40pm
Thank you very much for your answer.
but the demo does not work with microsoft edge and the rule does not show up in all the browsers I've used.
thank you for sending me the dll that you used in your test.
and how can I send you all my example because the maximum size in the joint ticket is 300 ko.
thank you in advance.

Title: Re: update dll & label shape & background
Post by 08804139 on Dec 26th, 2018 at 4:56pm
Hi,

I managed to reduce the problem related to the display of the "Ruler" component.
but when I add an Accordion the display of the whole interface disappear (use Mindfusion.UI.web.dll)
here you find the error displayed in the browser.
How can I solve this problem?
Can you send me the Mindfusion.UI.web.dll.
I used dll found in your forum zip folder netdiag62.zip.

Thanks
error1_.png ( 25 KB | 241 Downloads )
error1_details.png ( 39 KB | 240 Downloads )

Title: Re: update dll & label shape & background
Post by Slavcho on Dec 28th, 2018 at 8:52am
Hi,

I've tried with the Samples/C#/Controls sample project installed with released 6.2 version from https://www.mindfusion.eu/NetDiagramTrial.zip. It might have some incompatibilities with older Mindfusion.UI.web.dll versions though - that assembly is from our WebForms pack, we'll try to release updated version in January.

Just in case Edge version on your system cannot display very large Canvas elements, try also setting the DiagramView.CanvasVirtualScroll property.

Regards,
Slavcho

Title: Re: update dll & label shape & background
Post by Lyubo on Jan 2nd, 2019 at 12:58pm
Hi,

We built a new MindFusion.UI.WebForms.dll to resolve the incompatibility issues. We've uploaded a small sample project that shows a Diagram view with enabled Ruler, along with NodeList views, nested within an Accordion, referencing the new assemblies. You can download the sample here: https://mindfusion.eu/_samples/AccordionSample.zip. The updated assembly can be found in the References directory.

We tested the sample in various browsers, including MS Edge, and didn't notice problems. On another note, you may need to change the namespace/assembly declarations for the MindFusion.UI.WebForms.dll, as we noticed you used an old version, which uses the outdated MindFusion.UI.Web namespace.

Regards,
Lyubo


Title: Re: update dll & label shape & background
Post by 08804139 on May 30th, 2019 at 9:59am
Hello  ::)
how can I specify how to save my XML file.
ie the links are saved in the XML file in order from left to right and not in drawing order
:-?

Title: Re: update dll & label shape & background
Post by Slavcho on May 30th, 2019 at 10:28am
Hi,

Links are saved in XML in same order as the diagram.Links collection. Try sorting the collection before saving by whatever criteria you want, by calling the collection's Sort method - something like diagram.Links.Sort((l1, l2) => l1.StartPoint.X.CompareTo(l2.StartPoint.X));

Regards,
Slavcho

Title: Re: update dll & label shape & background
Post by 08804139 on May 30th, 2019 at 1:54pm
Can you explain to me better  :-[
I used this code :
          canvasView.SaveToXml(_pathfile);
just i want the links in the XML file saved in order from left to right.


-<Links>
+<Link Version="2" Id="16" Class="std:DiagramLink">
-<Link Version="2" Id="18" Class="std:DiagramLink">
.......
Sans_titre.png ( 11 KB | 223 Downloads )

Title: Re: update dll & label shape & background
Post by Slavcho on May 30th, 2019 at 2:26pm
The elements under <links> will be created in the order defined by Diagram.Links collection, so you must sort it before saving if you want them in any particular order. In your case, call canvasView.Diagram.Links.Sort(...) before canvasView.SaveToXml.

Regards,
Slavcho

Title: Re: update dll & label shape & background
Post by 08804139 on Jun 7th, 2019 at 10:45am
thanks for your understanding.  :)
now i want to put a node in my diagram in a position defined also in relation to the rule component in meter
thank you in advance  :D

Title: Re: update dll & label shape & background
Post by Slavcho on Jun 7th, 2019 at 11:34am
Do you mean you need to convert coordinates from meters to diagram's MeasureUnit?

Title: Re: update dll & label shape & background
Post by 08804139 on Jun 7th, 2019 at 1:00pm
Yes
in addition I want that I insert nodes in positions in meters with the code.

Title: Re: update dll & label shape & background
Post by 08804139 on Jun 7th, 2019 at 1:16pm
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)
diagramme.png ( 20 KB | 232 Downloads )

Title: Re: update dll & label shape & background
Post by Slavcho on Jun 10th, 2019 at 7:02am
From the image it looks like you've set ruler's unit to cm, while the diagram's default units are mm, so you could set matching coordinates by multiplying the cm positions you want by 10. Alternatively change diagram's measure unit to cm too (e.g. diagram.setMeasureUnit(MindFusion.Drawing.GraphicsUnit.Centimeter) from client side) and you won't need to convert position values, but then you might have to change various diagram default-values to specify them in cm.

Regards,
Slavcho

Title: Re: update dll & label shape & background
Post by 08804139 on Jun 10th, 2019 at 7: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
                              
Diag.png ( 27 KB | 225 Downloads )

Title: Re: update dll & label shape & background
Post by Slavcho on Jun 10th, 2019 at 9:29am
Is that diagram variable actually set? Try calling sender.setMeasureUnit(...);

Title: Re: update dll & label shape & background
Post by 08804139 on Jun 10th, 2019 at 11:38am
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 | 200 Downloads )

Title: Re: update dll & label shape & background
Post by Slavcho on Jun 11th, 2019 at 6: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

The MindFusion Forums » Powered by YaBB 2.6.11!
YaBB Forum Software © 2000-2024. All Rights Reserved.