Adornment & Databinding Question

Hi,

I was wondering if there is some limitation with data binding realtime updates within adornments templates…

What i am trying to achieve is select a node and have a selectionAdornmentTemplate show an overlay textbox next to the node to display data that’s updating in realtime (every second), databound to a property in the model.modelData.

It looks like it only does the databind when first selected, but doesn’t trigger afterwards. I can take that same textbox & binding and move it up into the node template and the data updates in realtime.

Is this the intended behavior of the Adornments…that the bindings only get evaluated when first triggered/displayed?

Note: What i really like is the overlay that the tooltip and selection adornments have so the textbox doesn’t affect the formatting/size of the nodes/groups under/around them. Unless there’s a better method to achieve the same effect?

That sounds like a bug. We’ll investigate this tomorrow. Thanks for reporting it!

I modified an existing jsfiddle to demo this:

http://jsfiddle.net/jjroy/yact1Lpq/

I also noticed in latest 2.1 version, i had to initialize the modelData & property name in the diagram model or it would never bind…2.0.17 and earlier…i could add the property after the fact via the setDataProperty and the data bind would work once the value gets updated. (U can see this with the commented out line in the model and try it with 2.1)

OK, this will be fixed in 2.1.1. I’m not sure when that will be released, but I’d expect next week.

I was not able to notice any problems with whether the node’s data or the shared model’s modelData already had the property initialized or not. When the property had a non-undefined value, it was used properly when the adornment was added. When the property was undefined, the binding is not supposed to be evaluated anyway – so any default value or value that you set in the template will still be there.

Maybe that initialization issue was something else, or I was not waiting long enough for the timer to trigger/load.

I’ll let you know if i can recreate it…