Here's finally the cleansed patch that integrates this amazing piece of JS. These files (canviz, excanvas and prototype) are downloaded from their specific repositories because they are released under APACHE and MIT-style licenses and thus may not be included in the Drupal repo. Oh and the other patch has to be applied before, it fixes the CODER module's complaints so the new functionality is clearly split from the style fixes.
wow, this really has been a tough job. ^^

Comments

infojunkie’s picture

Status: Needs review » Needs work

Thanks for this patch. There is, however, a better way to integrate new formats that does not need hacking into the Graphviz Filter module.

To do this, you need to implement hook_graphviz_formats and hook_graphviz_render. Check out graphviz_formats.module for an example. The idea is to declare a new render format 'canviz' that accepts a specific set of Graphviz output formats (e.g., png, eps, svg). Your hook_graphviz_render hook is then called with the file to embed in Canviz.

eMPee584’s picture

Status: Needs work » Reviewed & tested by the community

But this is wrong, canviz IS an output format. It's either png or canviz. I chose against implementing into the formats module because canviz should imho be integrated into the core filter as it is by far the most useful output format for display on websites.
Did you try the patch?

infojunkie’s picture

Status: Reviewed & tested by the community » Needs work

I noticed that you are already using the hooks mentioned above - sorry for speaking too soon.

However, I still think it should be packaged in its own module, or in the graphviz_formats module. The core filter should not be burdened with downloading Javascript files and similar tasks. I will just transfer that code elsewhere.

Thanks again for a great patch!

sethcohn’s picture

+1 to the idea of a new module for this... due to the dependency on (even more) non-includable code.
Leave 'core' as it with the existing dependance on getting graphviz itself and the pear code.

eMPee584’s picture

Status: Needs work » Needs review
StatusFileSize
new8.73 KB

Well imho the canviz output format is soo useful that it should be used where ever possible, and if it is in graphviz_formats module it just means increasing the loaded module count.. but anyways.

Here's finally the revised patch that puts the canviz stuff into graphviz_formats module. The graphviz_filter-coding-style-fixes.patch from initial posting is mandatory for it to cleanly apply. Oh, and btw i tested it before with my http://drupal.org/project/graphviz_styles module and yes, it still works (although i have to update that one.) ;-)

eMPee584’s picture

bump?

bakr’s picture

I cannot apply the patch,

when is it going to be integrated into a released dev version?

Great Works!