NPellet / visualizer

Other
43 stars 23 forks source link

display value and rendering order #912

Closed lpatiny closed 8 years ago

lpatiny commented 8 years ago

I think that when we have a force type and a sprintf we should first apply sprintf and then the type rendering we should first apply sprintf and then the rendering and it seems to me that currently it is the opposite

https://github.com/NPellet/visualizer/blob/f412b851c3eab2d4087fc8732f94b29ee6e69404/src/modules/types/display/single_value/view.js#L101-L119

stropitek commented 8 years ago

This was implemented when we were using the typerenderer only on type/value variables. In that case each variable can have it's own typerenderer and it doesn't make sense to apply the sprintf first.

So should we have 2 behaviors?

lpatiny commented 8 years ago

But I don't see any case where it would be useful to apply sprintf before the typerenderer. Why it does not amke sense to apply the sprintf on the value even if it is type/value

stropitek commented 8 years ago

https://my.cheminfo.org/?viewURL=https%3A%2F%2Fmydb.cheminfo.org%2Fdb%2Fvisualizer%2Fentry%2Fb584904c627bc1ac1479eceff7a859ab%2Fview.json&v=HEAD (use admin@cheminfo.org) Let me know if the behavior is what you expect