Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Shapenode are not bound to diagram.bound property (Read 5927 times)
Pratik
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: May 15th, 2014
Shapenode are not bound to diagram.bound property
Dec 19th, 2014 at 9:24am
Print Post  
Plz reply
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shapenode are not bound to diagram.bound property
Reply #1 - Dec 19th, 2014 at 11:51am
Print Post  
You could enable Diagram.AutoResize to make the diagram grow automatically when users drag nodes outside its boundaries. Or otherwise handle the NodeModifying validation event and set e.Cancel = true to prevent users from moving nodes beyond diagram edges when diagram.Bounds does not contain node.Bounds.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Pratik
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: May 15th, 2014
Re: Shapenode are not bound to diagram.bound property
Reply #2 - Dec 19th, 2014 at 12:16pm
Print Post  
I used image map and the version which i used does not e.cancel option
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shapenode are not bound to diagram.bound property
Reply #3 - Dec 19th, 2014 at 2:14pm
Print Post  
It's raised in ImageMap mode too since version 3.0.1, as long as you set EnableItemsDOM:

Code
Select All
...

    <ndiag:DiagramView runat="server"
		ID="diagramView"
		ClientSideMode="ImageMap"
		NodeModifyingScript="onNodeModifying"
		EnableItemsDOM="true"
        Width="800px" Height="500px" >
    </ndiag:DiagramView>

    <ndiag:InteractivityExtender runat="server" TargetControlID="diagramView" />

    </form>
</body>

<script type="text/javascript">
	function onNodeModifying(sender, args)
	{
		//alert("mod");
		var nodeRight = args.get_bounds().right();
		var nodeBottom = args.get_bounds().bottom();
		var viewDiv = sender.get_element();
		if (nodeRight > view.scrollWidth || nodeBottom > view.scrollHeight)
			args.set_cancel(true);
	}
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Pratik
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: May 15th, 2014
Re: Shapenode are not bound to diagram.bound property
Reply #4 - Dec 23rd, 2014 at 5:05am
Print Post  
Shapes.BpmnStartMessage.TextArea
throws exception "index was outside the bound arrays"
in image map mode
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shapenode are not bound to diagram.bound property
Reply #5 - Dec 23rd, 2014 at 1:23pm
Print Post  
What does your code that uses Shapes.BpmnStartMessage.TextArea look like?
  
Back to top
 
IP Logged
 
Pratik
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: May 15th, 2014
Re: Shapenode are not bound to diagram.bound property
Reply #6 - Dec 23rd, 2014 at 2:00pm
Print Post  
Display text out side the node
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shapenode are not bound to diagram.bound property
Reply #7 - Dec 23rd, 2014 at 6:32pm
Print Post  
Please post your .NET code that leads to exception.
  
Back to top
 
IP Logged
 
Pratik
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: May 15th, 2014
Re: Shapenode are not bound to diagram.bound property
Reply #8 - Dec 24th, 2014 at 4:29am
Print Post  
Dim objShapeNode As ShapeNode = Nothing
objShapeNode = objDiagram.Factory.CreateShapeNode(2, 2, 20, 20)
objShapeNode.Shape = Shapes.Rectangle
objShapeNode.Brush = New LinearGradientBrush(Color.White, Color.White, 75)
            
            objShapeNode.Font = New Drawing.Font(New FontFamily("arial"), 9, FontStyle.Bold)
            objShapeNode.Transparent = True
            objShapeNode.Shape.TextArea = Shapes.BpmnStartMessage.TextArea
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shapenode are not bound to diagram.bound property
Reply #9 - Dec 26th, 2014 at 9:01am
Print Post  
That code does not throw any exceptions for me. Please post the exception stack trace.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint