-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow clients to add more attributes to html output #96
Conversation
@@ -228,10 +228,10 @@ public function createImageSrc() | |||
public function createImageHtml() | |||
{ | |||
if ($this->format === 'svg' || $this->format === 'svgz') { | |||
return '<object type="image/svg+xml" data="' . $this->createImageSrc() . '"></object>'; | |||
return '<object width="100%" type="image/svg+xml" data="' . $this->createImageSrc() . '"></object>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could argu the client should call createImageSrc
instead.
But I prefer an attributes approach.
Hmmm ... this is too tricky. In Drupal I had two groups (1 class and the other 10 classes) of which each image renders 100% width ... that looks bad. |
I want to merge this today as:
|
Thanks for the PR! I can perfectly understand where you're coming from and certainly see a need for something like this.
Thanks for the heads up. However, I think we should reconsider if we actually want this in this library. We've already discussed moving GraphViz support to a separate project (which I'm not opposed against at all). Also, your changes add a requirement for Perhaps it makes sense to remove |
Yeah ... we should come up with a good package diagram. What belongs were! Moving Graphviz out of Graph is a good idea. Puzzle is where to? A new repo? I have no good suggestion for it's new home :-/
Adding ext-dom to the plate is indeed a nimby dependency for Graph. But for Graphviz we want to add HTML like stuff then ext-dom is not bad IMHO ... I'm working in a test for graph-uml clue/graph-uml#23
I like the code flow as setFormat decide what the output html should be. So please leave it in. |
Shall we add the PR apart from the functional changes in function createImageHtml() Then we have the nice createImageObject for CMS clients like Drupal. Or does that break installation on non ext-dom systems? |
Let's not loose this PR for graphviz :) |
As noted above, GraphViz will be split off into a separate repository, see graphp/graphviz#1.
I've moved the suggestion over to graphp/graphviz#4, so we can now close this here. Thanks for the suggestion! |
Hope to find time to revive my PR but afraid not :( |
This PR adds
in order to allow clients to add more attributes to render their graph html like