Page Index Toggle Pages: 1 2 3 [4] 5 6 ... 10 Send TopicPrint
Very Hot Topic (More than 25 Replies) Html Node in Diagram ! (Read 62635 times)
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 284
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Html Node in Diagram !
Reply #45 - Jul 3rd, 2019 at 6:48am
Print Post  
Hi Lyubo ! Yes, you are correct ! Thank you !
  
Back to top
 
IP Logged
 
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 284
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Html Node in Diagram !
Reply #46 - Jul 3rd, 2019 at 7:01am
Print Post  
Hi,

Attached image has nodes in the shape of Diamond, Circle etc.

I've defined these nodes as CompositeNode since I want to set more than one image, text etc.

May I know how to set Shape for these kind of nodes (as we do in ShapeNode like setting Shape as Decision, Ellipse etc).

Regards,
Kannan
  

Decision_Ellipse_Shape_Nodes.png (Attachment deleted)
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Html Node in Diagram !
Reply #47 - Jul 3rd, 2019 at 12:46pm
Print Post  
Hi,

This is not currently available in our JavaScript library. We have support for shape components for CompositeNode in our .NET product, and will try to port this functionality in upcoming release.

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


I Love Mind Fusion Diagram
:-)

Posts: 284
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Html Node in Diagram !
Reply #48 - Jul 3rd, 2019 at 12:53pm
Print Post  
Hi,

I like to have this feature since we also porting our app from wpf/silverlight developed with mind fusion. One necessary behavior is like, on selection of Ellipse type node, the highlighted border should be Circle and not Rectangle.

May I know when I can expect this feature?

Regards,
Kannan
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3380
Joined: Oct 19th, 2005
Re: Html Node in Diagram !
Reply #49 - Jul 16th, 2019 at 8:07am
Print Post  
This build implements shape components -
https://mindfusion.eu/_beta/jsdiag334.zip

Code
Select All
var OrgChartNode2 = CompositeNode.classFromTemplate("OrgChartNode2",
{
	component: "SimplePanel",
	children:
	[
		{
			component: "Shape",
			id: "Star16Pointed",
			autoProperty: true,
			name: "OutlineShape",
			pen: "gray",
			brush: "silver",
			isOutline: true
		}
	]
});
 



Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 284
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Html Node in Diagram !
Reply #50 - Jul 29th, 2019 at 11:25am
Print Post  
Hi,

I tried the Shape component type but got the below error. I used the two js files attached in your previous reply,

core.js:12501 ERROR ReferenceError: Shape is not defined
at mdiag.ComponentLoader.componentFromJson (eval at ./node_modules/diagram-library/MindFusion.Diagramming.js (MindFusion.Diagramming.js:1), <anonymous>:1:239426)

I've attached the template file of the composite node. I've a component named "MainImage". I need this to be Shape component and also it should have image as shown in the attached screen shot in one of the previous reply.

Sample code is uploaded in the below url,

https://drive.google.com/open?id=1K9w11GxUndjTU6cvfH9Z4iSZFCHpPsnD

Regards,
Kannan
  

diagram-node_template_001.txt (Attachment deleted)
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Html Node in Diagram !
Reply #51 - Jul 29th, 2019 at 2:04pm
Print Post  
Hi,

There seems to be a bug in the composite shapes that causes this. Until we release a fix, as a workaround, you can declare the Shape variable before creating your nodes:
Code (Javascript)
Select All
var Shape = MindFusion.Diagramming.Shape; 



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


I Love Mind Fusion Diagram
:-)

Posts: 284
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Html Node in Diagram !
Reply #52 - Jul 30th, 2019 at 4:52am
Print Post  
Hi,

I tried the same workaround but still I'm getting the same error.

Could you please check the sample code uploaded in the below path?

https://drive.google.com/open?id=1iAS4tUscwzAmIlLl_BftPnCOCX8NL-0G

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


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Html Node in Diagram !
Reply #53 - Jul 30th, 2019 at 7:16am
Print Post  
Hi,

This scripts from this new beta should fix the problem: https://mindfusion.eu/_beta/jsdiag334.zip.

We will let you know when we update the npm package too.

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


I Love Mind Fusion Diagram
:-)

Posts: 284
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Html Node in Diagram !
Reply #54 - Jul 30th, 2019 at 7:27am
Print Post  
Hi,

I've already tried those js files and was getting those errors. The same sample code uploaded to this url,

https://drive.google.com/open?id=1iAS4tUscwzAmIlLl_BftPnCOCX8NL-0G

Regards,
Kannan

Lyubo wrote on Jul 30th, 2019 at 7:16am:
Hi,

This scripts from this new beta should fix the problem: https://mindfusion.eu/_beta/jsdiag334.zip.

We will let you know when we update the npm package too.

Regards,
Lyubo

  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Html Node in Diagram !
Reply #55 - Jul 30th, 2019 at 7:35am
Print Post  
Hi,

Did you try the files from the zip i just posted? They were created just an hour ago and should fix the issue you reported. They are not the same as the ones we posted before.

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


I Love Mind Fusion Diagram
:-)

Posts: 284
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Html Node in Diagram !
Reply #56 - Jul 30th, 2019 at 7:45am
Print Post  
Hi,

I tried the new one now. I've defined the component in the template like this,

        {
          "gridColumn": 0,
          "component": "Shape",
          "name": "MainImage",
          "autoProperty": true,
          "location": "./assets/images/pfd/MainImage.png",
          "margin": "3",
          "imageAlign": "TopLeft",
       "isOutline": true
        },

Now I'm getting the below error,

core.js:12501 ERROR TypeError: this.namedComponents[name].setDefaultProperty is not a function
    at ns.<computed>.propertyMap.<computed> [as setMainImage] (eval at ./node_modules/diagram-library/MindFusion.Diagramming.js (MindFusion.Diagramming.js:1), <anonymous>:1:240248)
    at FlowDiagramComponent.push../src/app/diagram/diagram.component.ts.FlowDiagramComp
onent.createCompositeNode (diagram.component.ts:440)

May I know how to set image in this Shape component?

Regards,
Kannan

Lyubo wrote on Jul 30th, 2019 at 7:35am:
Hi,

Did you try the files from the zip i just posted? They were created just an hour ago and should fix the issue you reported. They are not the same as the ones we posted before.

Regards,
Lyubo

  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Html Node in Diagram !
Reply #57 - Jul 31st, 2019 at 11:05am
Print Post  
Hi,

This build improves the support for Shape components: https://mindfusion.eu/_beta/jsdiag334.zip. CompositeNode contents will now clip to the shape outline.

The Shape component doesn't support setting an image directly, but you can use it as an outline for your nodes. So what you can do is add a shape outline and an Image component as part of your CompositeNode template:
Code
Select All
//...
{
	component: "Shape",
	id: "Cloud",
	autoProperty: true,
	name: "OutlineShape",
	pen: "gray",
	brush: "Transparent",
	isOutline: true
},
{
	gridColumn: 0,
	component: "Image",
	name: "MainImage",
	autoProperty: true,
	location: "./assets/images/pfd/MainImage.png",
	margin: "3",
	imageAlign: "TopLeft"
},
// ... 



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


I Love Mind Fusion Diagram
:-)

Posts: 284
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: Html Node in Diagram !
Reply #58 - Aug 1st, 2019 at 6:48am
Print Post  
Thank Lyubo. I tried the same and now outline is coming but the outline size is small. I couldn't find any property to set height or width. May I know how to?
  

Decision_Shaped_Composite_Nodes.png (Attachment deleted)
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Html Node in Diagram !
Reply #59 - Aug 1st, 2019 at 7:25am
Print Post  
Hi,

From your screen grab it appears you've limited your Shape component inside a GridPanel column/row. Make sure that it isn't so and the Shape can actually span the entire size of the node. You can also attach your template, so we can have a look.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 3 [4] 5 6 ... 10
Send TopicPrint