Data Mapping exapn/collapse Headers

36 views
Skip to first unread message

Srinivasa Reddy

unread,
Jun 16, 2021, 1:33:40 AM6/16/21
to JointJS
Hi Team,
Greetings of the day,
i'm using Rappid 3.3V for data mapping . Each Record(below attachment) having the groups like Primary and secondary . When ever i'm adding the record to graph with help of record.addTo(graph) method, need to make the secondary group as collapsable by default.
Can you please help me with that functionality. 
MicrosoftTeams-image.png

Thanks in Advance
 

Roman Bruckner

unread,
Jun 16, 2021, 2:56:35 AM6/16/21
to joi...@googlegroups.com
Hi,

you'd need to set `collaped: true` property to the item that meant to be collapsed (https://resources.jointjs.com/docs/rappid/v3.3/shapes.html#shapes.standard.Record.config).

record.set('items', [ [{ id: 'value1', label: 'Primary' }, { id: 'value2', label: 'Secondary', collapsed: true }],
]);

Best,
Roman


--

---
You received this message because you are subscribed to the Google Groups "JointJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jointjs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jointjs/18b10827-d1ce-4594-9a90-ab39da49645dn%40googlegroups.com.


--

Srinivasa Reddy

unread,
Jun 16, 2021, 10:30:39 AM6/16/21
to JointJS
Thanks,
if i need to do the expand from code base do i need to update the property or else is there any event is available.
Thanks in advance.

Roman Bruckner

unread,
Jun 16, 2021, 10:35:56 AM6/16/21
to joi...@googlegroups.com
There is a method to do it (which updates the property internally).

record.toggleItemCollapse(itemId [, opt]);

Reply all
Reply to author
Forward
0 new messages