almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.86k stars 1.48k forks source link

feat: added the ability to set the size of an icon when using a dot s… #4220

Open jamespcole opened 5 years ago

jamespcole commented 5 years ago

This is a small change allowing the icon size to be scaled relative to the node when using the dot shape.

The existing "icon.size" property is ignored when using a "dot" shape so this new option is intended to enable specifying the icon size relative to the shape size.

To use this a "scale" setting can be added to the icon settings:


{
    shape: 'dot',
    size: 30,
    icon: {
        face: 'FontAwesome',
        color: '#2B7CE9',
        scale: 0.9,
    }
}

Thank you for contributing to vis.js!!

Please make sure to check the following requirements before creating a pull request:

exoego commented 5 years ago

Code is LGTM.

It would increase a chance to get merged if new option is added to