@ruth_psychx86 wrote:
How to create Adornments depending on the category and name of the Node. If categories is an array of objects which has another set of array of objects this array has the name of the node along with and an array called adornments. Now using the adornments Array I want to create an adornment for each array value.
palleteNodes = [{'type': 'trigger', nodes: [ { name: 'activity', id: '1', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#E7EDFF', color: '#0A8FFD', adornments: ['yes'], toLinkable : true, fromLinkable : false, }, { name: 'segments', id: '2', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#E7EDFF', color: '#0A8FFD', adornments: ['yes'], toLinkable : true, fromLinkable : false, }, { name: 'list', id: '3', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#E7EDFF', color: '#0A8FFD', adornments: ['yes'], toLinkable : true, fromLinkable : false, }, { name: 'contact master', id: '4', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#E7EDFF', color: '#0A8FFD', adornments: ['yes'], toLinkable : true, fromLinkable : false, } ] }, {'type': 'actions', nodes: [ { name: 'email', id: '5', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Sent' , 'Opened', 'Clicked', 'Hard Bounced'], toLinkable : true, fromLinkable : true, }, { name: 'sms', id: '6', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Sent' , 'Delivered', 'NDNC dropped', 'Others', 'Clicked on link' ], toLinkable : true, fromLinkable : true, }, { name: 'webpush', id: '7', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Delivery' , 'Failed', 'Clicked', 'Allowed' , 'Blocked'], toLinkable : true, fromLinkable : true, }, { name: 'app push', id: '8', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Sent' , 'Delivered', 'NDNC dropped', 'Others'], toLinkable : true, fromLinkable : true, }, { name: 'voice', id: '9', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Yes'], toLinkable : true, fromLinkable : true, }, { name: 'webhook', id: '10', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Yes'], toLinkable : true, fromLinkable : true, }, { name: 'update attribute', id: '11', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Yes'], toLinkable : true, fromLinkable : true, }, { name: 'whatsapp', id: '12', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Sent' , 'Delivered', 'Viewed'], toLinkable : true, fromLinkable : true, }, { name: 'remove from journey', id: '13', icon: 'assets/shopping-cart.png', shape: 'RoundedRectangle', background: '#fae7ff', color: '#BE52F2', adornments: ['Yes'], toLinkable : true, fromLinkable : true, }, ] },];I am using the above variable to create palette nodes which are without adornment. After drag and drop on canvas, I want to see the node with adornments (see the key adornments from the above array variable). How can I achieve this?
Posts: 1
Participants: 1