Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Drag & Drop Panel Bar Items to Diagram ! (Read 14898 times)
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 270
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Drag & Drop Panel Bar Items to Diagram !
Reply #30 - Oct 10th, 2019 at 12:39pm
Print Post  
Hi,

I observed, when I set to 400 like below, I'm able to move right,

this.diagram.setScrollZoneSize(400);

Then, I'm using Typescript. I couldn't see the latest code updated in the npm,

https://www.npmjs.com/package/diagram-library

May I know when it will happen?

Regards,
Kannan
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Drag & Drop Panel Bar Items to Diagram !
Reply #31 - Oct 11th, 2019 at 8:43am
Print Post  
Hi,

The npm package has been updated. Can download it now.

Regards,
Lyubo
MindFusion
  
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: Drag & Drop Panel Bar Items to Diagram !
Reply #32 - Oct 11th, 2019 at 11:36am
Print Post  
Hi,

I took the latest and tried. It works still without setting setScrollZoneSize. But I observed few issues,

1. Still the canvas bounds is not stretched completely. Please check the attached screen shot.
2. When moving the node, the canvas area is extended if I move slow and if I move fast, then it is not moved after that canvas bounds.
3. Also the right side scroll is not smooth when moving slowly.

Regards,
Kannan
  

Diagram-Move_Node-3.png ( 105 KB | 120 Downloads )
Diagram-Move_Node-3.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Drag & Drop Panel Bar Items to Diagram !
Reply #33 - Oct 11th, 2019 at 1:00pm
Print Post  
Hi,

Can you reproduce these issues without the splitter controls you're using?

Regards,
Lyubo
MindFusion
  
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: Drag & Drop Panel Bar Items to Diagram !
Reply #34 - Oct 11th, 2019 at 1:14pm
Print Post  
Yes, I tried the same with splitter pane removed still same issue. Please check the attached screen shot.
  

Diagram-Move_Node-4.png ( 174 KB | 119 Downloads )
Diagram-Move_Node-4.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Drag & Drop Panel Bar Items to Diagram !
Reply #35 - Oct 11th, 2019 at 1:37pm
Print Post  
The diagram canvas is supposed to be placed inside a parent div (that will show the scrollbars, so overflow should be enabled); The diagram size is set via the Bounds property, and it will not resize itself automatically, unless you're autoscrolling (which won't happen if there is no scroll available) or interacting with items with AutoResize set.

From what it appears from your screenshot, your diagram bounds are too small, and you don't have scrolling enabled on the parent div.
  
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: Drag & Drop Panel Bar Items to Diagram !
Reply #36 - Oct 11th, 2019 at 1:44pm
Print Post  
This is how I've done. Is this wrong?

  <div style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: auto;background-image:url(./assets/images/GridImage.png); border-width:thick; border-color:blue">
    <canvas #canvas id="diagram" draggable="true"></canvas>
  </div>
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Drag & Drop Panel Bar Items to Diagram !
Reply #37 - Oct 14th, 2019 at 6:23am
Print Post  
Hi,

Even if the diagram bounds are smaller than the viewport size (which is apparent from your screenshot), you should be able to autoresize by interacting close to the bounds edges. I can do that fine in my test project. There may be something else in your application that prevents it. You can try setting a larger bounds value, so that scroll bars show and try if autoscrolling / autoresizing work.

Regards,
Lyubo
MindFusion
  
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: Drag & Drop Panel Bar Items to Diagram !
Reply #38 - Oct 31st, 2019 at 10:06am
Print Post  
Hi,

I've set the below,

this.diagram.setAutoResize(MindFusion.Diagramming.AutoResize.RightAndDown);

Now it is not scrolling up or left.

But when I move the node up, it is moving up (Like attached : Shape Node Move Up - 2.png).

May I know how to stop that? (Like attached Shape Node Move Up - 1.png)

Regards,
Kannan

Lyubo wrote on Oct 8th, 2019 at 5:49am:
Hi,

What you see is the expected behavior of the diagram, when you have set the following in your code:
Code (Javascript)
Select All
this.diagram.setAutoResize(MindFusion.Diagramming.AutoResize.AllDirections);
this.diagram.setAutoScroll(true); 



The first property allows for the diagram to expand in all directions, when an item is being moved; the second allows the view to automatically scroll, when an item is being moved.

Regards,
Lyubo
MindFusion

  

Shape_Node_Move_Up_-_1.png ( 124 KB | 131 Downloads )
Shape_Node_Move_Up_-_1.png
Shape_Node_Move_Up_-_2.png ( 121 KB | 133 Downloads )
Shape_Node_Move_Up_-_2.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Drag & Drop Panel Bar Items to Diagram !
Reply #39 - Oct 31st, 2019 at 12:24pm
Print Post  
You could prevent nodes from leaving diagram's bounds like this -

Code
Select All
function onNodeModifying(sender, args)
{
	if (!sender.getBounds().contains(args.node.getBounds()))
		args.setCancel(true);
} 



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: Drag & Drop Panel Bar Items to Diagram !
Reply #40 - Oct 31st, 2019 at 12:44pm
Print Post  
It works Slavcho ! Thank you  Cheesy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint