Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) after updation of 3.5.2 version facing issues table node cell issue (Read 3480 times)
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
after updation of 3.5.2 version facing issues table node cell issue
Feb 25th, 2021 at 2:01pm
Print Post  
I am using table node and in this table node cell i am showing text data earlier i was showing correct but after updating of 3.5.2 version showing compress text as i have attached image below.
« Last Edit: Feb 26th, 2021 at 7:13am by reshma »  

Table_node_cell_issue1.png ( 115 KB | 94 Downloads )
Table_node_cell_issue1.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: after updation of 3.5.2 version facing issues
Reply #1 - Feb 26th, 2021 at 7:07am
Print Post  
The screenshot looks correct for what you'd get if using resizeToFitText's keepCellWidth option and cell labels don't fit on a single line. Maybe whatever old version you were using wasn't implementing that option correctly.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #2 - Feb 26th, 2021 at 7:16am
Print Post  
i have updated correct image above issue is like text is getting compress in new version and earlier old version showing proper text.
Please check above image
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #3 - Feb 26th, 2021 at 7:43am
Print Post  
Please post the code you use to create tables.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #4 - Feb 26th, 2021 at 11:55am
Print Post  
Hi,

Please find below snippet of code, which we are using to create a table node.

const nfNode: TableNode = this.diagram.getFactory().createTableNode(100, 160, width, height);
       
nfNode.setEnableStyledText(true);
nfNode.redimTable(colCount,  rowCount);
nfNode.setAllowResizeColumns(true);

nfNode.resizeToFitText(false, true);
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #5 - Mar 1st, 2021 at 9:01am
Print Post  
Hi,

From what we can tell, table.resizeToFitText never worked correctly with enableStyledText and keepCellWidth options enabled. It doesn't actually keep the column widths, but applies them as a limit while usually shrinking the columns. Anyway that incorrect logic interferes with some padding calculations we added recently and becomes visible with your larger texts. Our developer will try to fix that in next couple of days.

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #6 - Mar 2nd, 2021 at 1:18pm
Print Post  
This build should fix that -
https://mindfusion.eu/_temp/jsdiag353.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #7 - Mar 10th, 2021 at 5:47am
Print Post  
Hi,

Thank you for your efforts, but still there is a issue with text wrapping.

Attaching screen shot for the same.
  

Wrapping_Issue.PNG ( 91 KB | 88 Downloads )
Wrapping_Issue.PNG
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #8 - Mar 10th, 2021 at 6:25am
Print Post  
Please attach json file created by Diagram.toJson().
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #9 - Mar 10th, 2021 at 9:25am
Print Post  
Please find json file.
  

diagram_toJSON.json ( 44 KB | 117 Downloads )
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #10 - Mar 10th, 2021 at 4:54pm
Print Post  
I've replaced tutorial1.js code with this and text looks rendered correctly -

Code
Select All
var Diagram = MindFusion.Diagramming.Diagram;

var diagram;

$(document).ready(function ()
{
	diagram = Diagram.create($("#diagram")[0]);
	$.get("diagram_toJSON.json", onResponse);
});

function onResponse(json)
{
    if (json)
    {
        diagram.fromJson(json);

        for (var node of diagram.nodes)
        {
            if (node.resizeToFitText)
            {
                var height = node.rows[0].height;
                node.resizeToFitText(false, true);
                console.log("change: " + String(node.rows[0].height - height));
            }
        }
    }
} 



The JSON file doesn't seem to contain image cells while your screenshots were showing images. If you are doing some form of custom-drawing for the images and resetting cell.text.bounds to fit them, you will also need to adjust cell sizes after calling resizeToFit.

Otherwise make sure you aren't changing column sizes, font size, text or padding properties after the resizeToFit call.

Regards,
Slavcho
Mindfusion
« Last Edit: Mar 16th, 2021 at 2:59pm by Slavcho »  

JavaScript.zip ( 691 KB | 192 Downloads )
Untitled_001.jpg ( 476 KB | 111 Downloads )
Untitled_001.jpg
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #11 - Mar 12th, 2021 at 11:41am
Print Post  
Hi,

We tried with the given snippet of code but its not working.

As per the requirements we need images in cells but we are not
resetting the cell.text.bounds anywhere.

We tried to remove column sizes properties after the resizeToFit call even tough we need it for some specific requirement.
But unfortunately it didn't work.

We observed after removing "node.setEnableStyledText(true)" its working fine but in that case its not wrapping the caption text.

Please find attached screen shot.
  

Wrap_Issue.png ( 185 KB | 97 Downloads )
Wrap_Issue.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: after updation of 3.5.2 version facing issues table node cell issue
Reply #12 - Mar 12th, 2021 at 12:09pm
Print Post  
Please modify the JavaScript.zip above to reproduce that and attach it back.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint