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. Image for the cookie policy date

Error when clicking on item in symbol palette

Hi I've made a simple project trying to make use of the diagram and and symbol palettei've got this running but whenever I click on an item in the symbol palette container i get this error in the developer tools Uncaught ejDiagram: methods/properties can be accessed only after plugin creationError: ejDiagram: methods/properties can be accessed only after plugin creationAny ideas what i have done wrong, i have been following the guide in the documentation to get this set up.ThanksRobert

3 Replies

SG Shyam G Syncfusion Team May 18, 2017 12:40 PM UTC

Hi Robert, 
 
We have clicked an item in the symbol palette in our sample and unable to reproduce the reported issue at our end. Please provide us more details such as exact use case in which you are facing issue at your end or modify the below sample. 
 
 
Regards, 
Shyam G 



RW Robert Williamson May 19, 2017 08:54 AM UTC

Hi Shyam

Thanks for this, it turned out that this was due to a missing typings (ej.angular2.d.ts). Once added in this works as expected. 

One thing i have noticed though is if i add a node to the symbol palette with a space in the name, the next time i bring a node over to the grid it will make hundreds of that node until i release the click. Is this expected? The workaround i have at the minute is just to add an "_" to the name but i wouldnt really like to do this on display to a user

Thanks
Robert



SG Shyam G Syncfusion Team May 22, 2017 11:47 AM UTC

Hi Robert, 
 
Please note that we don’t specify a “whitespace” for an “id” attribute of HTML 5 elements. Please refer the below link for more details.  
 
 
If you need to display a name for the items in the symbol palette, please use paletteItems label property. This property is not available in the current release 15.2.0.40 and we have included it in the  below diagram.component.d.ts file. Please replace it in your application to resolve the reported issue. Please refer to the code example and sample below. 
 
Typescript file: diagram.component.d.ts 
 
Code example: 
 
'items': [ 
                    { 
                        'name': 'Rectangle', 'paletteItem': {'label':'Wide Rect'}, 
                    }, 
] 
 
 
Regards, 
Shyam G 


Loader.
Live Chat Icon For mobile
Up arrow icon