diff --git a/docs/network.html b/docs/network.html
index d1c2e9af..dfbac7e0 100644
--- a/docs/network.html
+++ b/docs/network.html
@@ -1009,7 +1009,6 @@ mySize = minSize + diff * scale;
'white' |
The color of the label stroke. |
-
shape |
string |
@@ -1018,7 +1017,7 @@ mySize = minSize + diff * scale;
Choose from
ellipse
(default), circle
, box
,
database
, image
, circularImage
, label
, dot
,
- star
, triangle
, triangleDown
, and square
.
+ star
, triangle
, triangleDown
, square
and icon
.
In case of image
and circularImage
, a property with name image
must
@@ -1095,6 +1094,30 @@ mySize = minSize + diff * scale;
The maximum radius for a scaled node. Only applicable to shapes dot ,
star , triangle , triangleDown , and square . This only does something if you supply a value. |
+
+ iconFontFace |
+ String |
+ undefined |
+ Font face for icons, for example FontAwesome or Ionicon . You have to link to the css defining the font by yourself (see Examples) |
+
+
+ icon |
+ String |
+ undefined |
+ Unicode of the icon f.e. \uf0c0 (user-icon in FontAwesome) |
+
+
+ iconSize |
+ Number |
+ 50 |
+ Size of the icon |
+
+
+ color |
+ String |
+ black |
+ Color of the icon |
+
diff --git a/lib/network/Node.js b/lib/network/Node.js
index 2e8cae93..e2270121 100644
--- a/lib/network/Node.js
+++ b/lib/network/Node.js
@@ -1033,6 +1033,10 @@ Node.prototype._resizeIcon = function (ctx) {
Node.prototype._drawIcon = function (ctx) {
this._resizeIcon(ctx);
+
+ this.options.iconSize = this.options.iconSize || 50;
+ this.options.iconSize = this.options.iconSize || 50;
+
this.left = this.x - this.width / 2;
this.top = this.y - this.height / 2;
this._icon(ctx, this.options.icon, this.x, this.y);