-
Notifications
You must be signed in to change notification settings - Fork 219
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
Add optional image to connectors and cables #153
Commits on Aug 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 43ec3bf - Browse repository at this point
Copy the full SHA 43ec3bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for c8c4005 - Browse repository at this point
Copy the full SHA c8c4005View commit details -
Remove border between image and caption
Adding helper function for each of these with a leading <tdX> tag that instructs nested_html_table() to inject attributes to the <td> tag.
Configuration menu - View commit details
-
Copy full SHA for 0cb7118 - Browse repository at this point
Copy the full SHA 0cb7118View commit details -
Expand example 08 with images and captions
- Stereo phone plug (a slight modification of a public domain image from https://openclipart.org/detail/192396/headphones-connctor ). - Cable cross-section drawn to match the wire colors in example 08. - Make the cable jacket and shield colors match the cross-section. - Images for embedding in the connector and cable nodes are stored in a new resources folder.
Configuration menu - View commit details
-
Copy full SHA for 06e6c49 - Browse repository at this point
Copy the full SHA 06e6c49View commit details -
Add an image_scale attribute to both Connectors and Cables
It specifies how an image will use any extra space available in its cell. Allowed values are one of these strings: - FALSE : keep image its natural size. (Default) - TRUE : scale image uniformly to fit. - WIDTH : expand image width to fill. - HEIGHT : expand image height to fill. - BOTH : expand both image width and height to fill. The value is sent to Graphviz as a scale attribute to the <img> tag. Note that there is normally no extra height in the image cell.
Configuration menu - View commit details
-
Copy full SHA for 3dc2a55 - Browse repository at this point
Copy the full SHA 3dc2a55View commit details -
Add an image_size attribute to both Connectors and Cables
It is a list containing minimum width and minimum height of the image cell. To obtain more available space in the image cell, this size must be set greater than the natural size of the image.
Configuration menu - View commit details
-
Copy full SHA for 41b3f3a - Browse repository at this point
Copy the full SHA 41b3f3aView commit details -
Add fixedsize as third image_size value
When True, enclose the image cell in a table without borders to avoid narrow borders when the fixed width is less than the node width.
Configuration menu - View commit details
-
Copy full SHA for 3d7f027 - Browse repository at this point
Copy the full SHA 3d7f027View commit details
Commits on Aug 15, 2020
-
Move image attributes into Image dataclass to fix change requests
@formatc1702 requested changes in his review of wireviz#153: - Lowercase attribute values - Nested image attributes - Avoid sending the whole node object as argument to helper functions - Simplify html_size_attr() - Move the resources folder
Configuration menu - View commit details
-
Copy full SHA for 204379a - Browse repository at this point
Copy the full SHA 204379aView commit details
Commits on Aug 16, 2020
-
Add info about Image dataclass
- Add Optional keyword and value alternatives as requested in review. - Add a few extra comments about the attributes.
Configuration menu - View commit details
-
Copy full SHA for c23679d - Browse repository at this point
Copy the full SHA c23679dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d289f95 - Browse repository at this point
Copy the full SHA d289f95View commit details -
Compute sensible default values for unspecified image attributes
The goal is to enable the user to avoid specifying more attributes than strictly needed.
Configuration menu - View commit details
-
Copy full SHA for 0c6b6f3 - Browse repository at this point
Copy the full SHA 0c6b6f3View commit details
Commits on Aug 19, 2020
-
Test image.width and image.height without using 'is not None'
- Simplification requested by @formatc1702 in review of wireviz#153 - Inspection of size_html_cell() in Graphviz source code https://gitlab.com/graphviz/graphviz/-/blob/master/lib/common/htmltable.c#L1210-1221 supports that a zero value is treated as not specified.
Configuration menu - View commit details
-
Copy full SHA for c217079 - Browse repository at this point
Copy the full SHA c217079View commit details -
Avoid some bad combinations of default values
- Avoid setting image.fixedsize default True when image.scale is specified different than "true" or "both" by the user. - Avoid calculating the missing dimension unless image.fixedsize is actually True. It might have been specified False by the user.
Configuration menu - View commit details
-
Copy full SHA for 285a28d - Browse repository at this point
Copy the full SHA 285a28dView commit details -
Add aspect_ratio() function that reads image size from file
- To be able to find an image file with relative path, the directory of the .gv file output is injected into each Image data object. - aspect_ratio() prints a warning and returns 1:1 ratio if it fails.
Configuration menu - View commit details
-
Copy full SHA for 19c415c - Browse repository at this point
Copy the full SHA 19c415cView commit details
Commits on Aug 21, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 9950f7f - Browse repository at this point
Copy the full SHA 9950f7fView commit details
Commits on Aug 29, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c0a11d0 - Browse repository at this point
Copy the full SHA c0a11d0View commit details -
It is only used during initialization in the __post_init__() function and does not need to be a proper attribute of the Image dataclass. https://docs.python.org/3/library/dataclasses.html#init-only-variables
Configuration menu - View commit details
-
Copy full SHA for ede29cb - Browse repository at this point
Copy the full SHA ede29cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c2fdd6 - Browse repository at this point
Copy the full SHA 7c2fdd6View commit details
Commits on Aug 31, 2020
-
Configuration menu - View commit details
-
Copy full SHA for dabd4ba - Browse repository at this point
Copy the full SHA dabd4baView commit details
Commits on Oct 11, 2020
-
As requested by the owner, it is added to both requirements.txt and setup.py - see also issue wireviz#172 about a possible redundancy/conflict.
Configuration menu - View commit details
-
Copy full SHA for a94ff3d - Browse repository at this point
Copy the full SHA a94ff3dView commit details
Commits on Oct 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 50d4dc7 - Browse repository at this point
Copy the full SHA 50d4dc7View commit details