Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

label margins for nodes #2343

Merged
merged 1 commit into from
Nov 22, 2016
Merged

label margins for nodes #2343

merged 1 commit into from
Nov 22, 2016

Conversation

eymiha
Copy link
Contributor

@eymiha eymiha commented Nov 21, 2016

fixes #1653
fixes #2342

This change allows the margin values of node labels to be set as a group or independently, and allows the default margin to be set for a network. Initially the default is 5, matching the margin used in the prior implementation; existing networks will not change appearance.

On the network options -

    nodes: { margin: number }

to apply the same value on all of the label's sides, or

    nodes: { margin: { top: number, right: number, bottom: number, left: number} }

to specify individual values.

The margin for individual nodes is changed with the same margin specifications.

examples/network/labels/labelMargins.html demonstrates the feature.

Copy link
Contributor

@yotamberk yotamberk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work! Thank you for this contribution =)
This PR is very well written (implementation to docs to examples)

Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PERFECT as far as I can see!

@mojoaxel mojoaxel merged commit b31ae14 into almende:develop Nov 22, 2016
@mojoaxel
Copy link
Member

@eymiha Nice Job! Thanks!

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants