We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change items in Diagram palette and it's performance

Thread ID:

Created:

Updated:

Platform:

Replies:

126991 Oct 20,2016 07:14 AM UTC Oct 21,2016 12:19 PM UTC JavaScript 1
loading
Tags: ejDiagram
Alex
Asked On October 20, 2016 07:14 AM UTC


I tried to filter items by className property in a diagram pallet and this works fine:

//get old palletes
var palettes = $(divName).ejSymbolPalette("instance").model.palettes;

//filter palettes
var newPalettes = palettes.map(function
(palette) {
palette.
items = palette.items.filter(function
(item) {
return item.className != className
;
});
return
palette;
});
//assing new palettes to diagram
$(divName).ejSymbolPalette
({
palettes:
newPalettes
});

Could you explain how to add (or remove) one (or several) items to Diagram palette without modifying whole array of items? (it seems have problem with rendering perfomance with huge number of items).

And related question: what's better way to add a large number of items to palette (in terms of performance)?








Shyam G [Syncfusion]
Replied On October 21, 2016 12:19 PM UTC

Hi Alexey, 
 
Query 
Response 
Could you explain how to add (or remove) one (or several) items to Diagram palette without modifying whole array of items? (it seems have problem with rendering performance with huge number of items). 
We considered this “Need to provide support to add/remove items from symbol palette” as an usability feature and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 
 
 
And related question: what's better way to add a large number of items to palette (in terms of performance)? 
You can add the large number of  palette Items at initial rendering or you can define empty palette at the initial rendering and use updatePalette method to render the palette at runtime. Both use case took same time to render the palette items. Please refer to the sample below in which we have shown how to update the palette items at runtime.  
 
 
 
 
Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;