Page Index Toggle Pages: 1 [2] 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) Can we add inside container node another container node on click of expand collapse button (Read 16725 times)
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Can we add inside container node another container node on click of expand collapse button
Reply #15 - Feb 8th, 2021 at 8:52am
Print Post  
i used your same code
const node = args.getNode();
const vo = node['data'];
const containerNode = node['childern'];
var ctr = node;
if (ctr.children.length == 0) {
var r = ctr.getBounds();
for (var i = 0; i < 310; i++) {
var child = this.diagram.factory.createContainerNode(r.x, r.y, 50, 10);
child.setText(String(i));
ctr.add(child);
}
this.arrangeContainers(ctr);
node['width'] = node.getBounds().width;
node['height'] = node.getBounds().height;
//this.setOffsetUnFoldedChildNodeHierarchical(node, node.bounds.bottom() + node.captionHeight);
this.diagram.resizeToFitItems();
//return;
}


private arrangeContainers(container) {
        var verticalLayout = new mg.LayeredLayout();
        verticalLayout.multipleGraphsPlacement = mg.MultipleGraphsPlacement.Vertical;

        while (container) {
            if (!container.getFolded())
                container.arrange(verticalLayout);
            container = container.container;
        }
    }
and for diagram setvirtualscroll true space is not showing but order changed
  

Net-diagram-element-order-changed.png (Attachment deleted)
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Can we add inside container node another container node on click of expand collapse button
Reply #16 - Feb 8th, 2021 at 9:54am
Print Post  
Layout.multipleGraphsPlacement wasn't sorting by nodes order in older versions, so I guess you aren't using a recent release. That should be fixed in v3.4 from an year ago.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Can we add inside container node another container node on click of expand collapse button
Reply #17 - Feb 8th, 2021 at 11:04am
Print Post  
For just i want to check it is working on 3.4 version what i can do now?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Can we add inside container node another container node on click of expand collapse button
Reply #18 - Feb 8th, 2021 at 12:06pm
Print Post  
You can check with current v3.5.2 from https://mindfusion.eu/JsDiagramTrial.zip
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Can we add inside container node another container node on click of expand collapse button
Reply #19 - Feb 9th, 2021 at 6:12am
Print Post  
Ok i will check but for 100 record it is showing in order if data is large that time this problem occurs,

and one more issue that I am facing after expanding node ,straight link is not working and cascading and default linking is working
  

straight_Link_Not_working_after_expand.png (Attachment deleted)
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Can we add inside container node another container node on click of expand collapse button
Reply #20 - Feb 9th, 2021 at 11:42am
Print Post  
With setVirtualScroll(true) space is not showing below but we have already scroll bar for the div without using setVirtualScroll(true) how can I handle this empty space?

Please let me know another way to handle this empty space.

And one more issue when i am clicking on node selected node not showing gray i have applied brush to gray it happen if i have multiple records(310)
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Can we add inside container node another container node on click of expand collapse button
Reply #21 - Feb 9th, 2021 at 12:51pm
Print Post  
Quote:
With setVirtualScroll(true) space is not showing below but we have already scroll bar for the div without using setVirtualScroll(true) how can I handle this empty space? Please let me know another way to handle this empty space.


Enabling VirtualScroll is the only way to handle that. If it's disabled, the canvas element gets as large as diagram.Bounds and relies on parent div's overflow for scrolling. Then at some point (e.g. with 310 nodes arranged vertically) it reaches maximum element size supported by the browser, the Canvas API stops working and the library cannot paint in that 'empty space'. With VirtualScroll enabled, the library keeps the canvas element small and implements custom scrolling.

Quote:
And one more issue when i am clicking on node selected node not showing gray i have applied brush to gray it happen if i have multiple records(310)


ctr.setBrush("gray") works in our test. Check if you aren't replacing the value from later code / event handler:

  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Can we add inside container node another container node on click of expand collapse button
Reply #22 - Feb 10th, 2021 at 5:08am
Print Post  
for temporary : showing space at last for 300 records issue if i used trial version for 3.5.2 and test will it work or not?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Can we add inside container node another container node on click of expand collapse button
Reply #23 - Feb 10th, 2021 at 8:32am
Print Post  
It should work with your older version too if you enable VirtualScroll mode -
Code
Select All
diagram.setVirtualScroll(true); 



In newer versions that's enabled by default.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Can we add inside container node another container node on click of expand collapse button
Reply #24 - Feb 10th, 2021 at 11:56am
Print Post  
for temporary also for order : showing order shuffle  for 300 records issue if i used trial version for 3.5.2 and test will it work or not?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Can we add inside container node another container node on click of expand collapse button
Reply #25 - Feb 10th, 2021 at 1:29pm
Print Post  
Yes, it will work.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Can we add inside container node another container node on click of expand collapse button
Reply #26 - Feb 11th, 2021 at 10:04am
Print Post  
Orader is wokring in trial verion but space not removed showing as it is only half element showing in diagram not 300 records and one more new issue observed when i am removing containrnode from diagram showing error like

:10050/vendor.js:49663 ERROR TypeError: this[b(...)].removedFromDiagram is not a function
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Can we add inside container node another container node on click of expand collapse button
Reply #27 - Feb 11th, 2021 at 11:12am
Print Post  
Quote:
removedFromDiagram is not a function


Check if your app isn't replacing the MindFusion.Drawing.Container class with a custom copy from old code. Otherwise please attach a test project reproducing that.

Quote:
only half element showing in diagram not 300 records


Seeing your nodes are custom-drawn, please verify that with standard ContainerNode rendering. If it works correctly then, check if your custom-drawing code isn't glitching at large Y coordinates. Otherwise please attach a test project reproducing that.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Can we add inside container node another container node on click of expand collapse button
Reply #28 - Feb 11th, 2021 at 11:41am
Print Post  
before trial version installation it was working but after installation of trial version not removing items.

In below diagram mindfusion.digramming error at below point
  

ContainerNode_remove_error.png (Attachment deleted)
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Can we add inside container node another container node on click of expand collapse button
Reply #29 - Feb 11th, 2021 at 11:48am
Print Post  
You can delete items just fine in Containers.js example (JsDiagram\Samples\JavaScript), so that comes from some interaction with your code. Let us know what we should change there to see that happen.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 
Send TopicPrint