I am currently developing an app wherein we will allow the users to configure the vertex templates in a way that he/she can select the background color, border color, border width etc.

\n

Then this information of the configured template will be sent by the server to the user interface\nI want to use this information to be able to construct a toolbar that instantiates that template so display the exact figure in the toolbar (with the background and border) For eg. a rectangle with yellow background or a rhombus with a 2 pixel red dashed border so that the user by looking at the toolbar itself understands the exact "type of object"

\n

Since our application will allow dynamic configuration, creation and use of icons in the toolbar is not an acceptable solution to us. Please suggest a way in which I will be able to achieve the above (maybe extending some classes or in some other way). I have no clue on how to proceed in this regard.

asked 17 Jan '12, 00:57

Tushar's gravatar image

Tushar
36117
accept rate: 0%


We do have an example where the template is rendered dynamically on the client-side, see javascript/examples/grapheditor/www/js/Sidebar.js (lines 344 - 390 and 17 - 22). This sidebar also generates a dynamically created preview (aka tooltip) of the cell in real size. This could be an interesting solution for you as it does not require another roundtrip or generation of image on the server-side.

link

answered 22 Mar '12, 23:33

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

This makes sense as a feature request, but it's a complex issue and the feature request queue is very full so we'd be looking at probably April before we can do it. If that's in your timescales please add it to the ticketing system at http://jgraph.zendesk.com.

link

answered 17 Jan '12, 01:41

David's gravatar image

David
4.9k21831
accept rate: 47%

For now I will solve this by dynamically loading the icon path associated to my symbol. But if possible please provide the flexibility to avoid this overhead.

(15 Feb '12, 01:29) Tushar
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×228
×10

Asked: 17 Jan '12, 00:57

Seen: 1,561 times

Last updated: 23 Mar '12, 00:32