1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

[Redesign] Set a max-width on Graphviz

Summary: Ref T8750, Adds a maxwidth class for Graphviz images.

Test Plan: Generate a Graphviz image, really big, see it scale to the viewport.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8750

Differential Revision: https://secure.phabricator.com/D13548
This commit is contained in:
Chad Little 2015-07-04 13:17:12 -07:00
parent 4c7208cfa9
commit 54194acd39

View file

@ -42,12 +42,13 @@ final class PhabricatorRemarkupGraphvizBlockInterpreter
return '<'.$file->getBestURI().'>'; return '<'.$file->getBestURI().'>';
} }
return phutil_tag( $img = phutil_tag(
'img', 'img',
array( array(
'src' => $file->getBestURI(), 'src' => $file->getBestURI(),
'width' => nonempty($width, null), 'width' => nonempty($width, null),
)); ));
return phutil_tag_div('phabricator-remarkup-embed-image-full', $img);
} }
// TODO: This is duplicated from PhabricatorEmbedFileRemarkupRule since they // TODO: This is duplicated from PhabricatorEmbedFileRemarkupRule since they