We have the need to add an overlay to a cell to denote the current status of the item represented by the cell. Looking at the overlay functionality and doing a quick prototype it appears that the overlays are primarily meant to be used for error functionality (for example, when you hover over an overlay, the cursor changes to a question mark pointer). Is there a way to add additional icons to a cell's display (not as a child cell) and not have it provide user feedback when hovering over it? I would like to avoid having to define an image file and associated style for each possible permutation of item type (different base shape) and status (different overlay).

asked 25 Apr '11, 06:41

cgidwhite's gravatar image

cgidwhite
194829
accept rate: 66%


"Indicators" as shown here can be used as "sub-shapes" in mxLabels.

link

answered 27 Apr '11, 08:21

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Is it possible to use this functionality to display an image stored at a specified URL instead of one of the canned shapes? I tried to use the "originalStyle;indicatorShape='image';indicatorImage='path/to/image'" as the style and it's not liking that during the graph construction in mxgraph. It's actually giving an error in the Javascript about a missing paren on the mxUtils.parseXml() call with the graph XML passed in. If I remove the indicator code, the error is not there.

(28 Apr '11, 07:11) cgidwhite

Try without the quotes inside the style, eg. "originalStyle;indicatorShape=image;indicatorImage=path/to/image;"

(28 Apr '11, 07:40) Gaudenz

That got around that problem. Thanks! The indicator is still not showing up. Are indicators allowed on vertices that are image type? There's no issue with having an image (indicator) in the label of an image vertex, is there?

(28 Apr '11, 08:07) cgidwhite

Indicators can currently only be used with mxLabel.

(28 Apr '11, 08:30) Gaudenz

So is the answer to the question that this functionality isn't possible in JGraphX and mxgraph?

(28 Apr '11, 11:20) cgidwhite

That's correct. It most likely will be added at some point, but I don't believe it's on the high priority list currently.

(28 Apr '11, 11:25) David
showing 5 of 6 show all
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: 25 Apr '11, 06:41

Seen: 3,623 times

Last updated: 28 Apr '11, 11:25