Browse Source

Merge remote-tracking branch 'origin/develop' into develop

Conflicts:
	examples/timeline/29_hiding_times.html
	examples/timeline/30_subgroups.html
v3_develop
Alex de Mulder 10 years ago
parent
commit
a1ec842ba1
2 changed files with 6 additions and 4 deletions
  1. +4
    -2
      examples/timeline/index.html
  2. +2
    -2
      lib/network/Node.js

+ 4
- 2
examples/timeline/index.html View File

@ -37,8 +37,10 @@
<p><a href="23_data_attributes.html">23_data_attributes.html</a></p>
<p><a href="24_all_data_attributes.html">24_all_data_attributes.html</a></p>
<p><a href="25_background_areas.html">25_background_areas.html</a></p>
<p><a href="26_templates.html">26_templates.html</a></p>
<p><a href="27_external_data.html">27_external_data.html</a></p>
<p><a href="26_external_data.html">26_external_data.html</a></p>
<p><a href="27_templates.html">27_templates.html</a></p>
<p><a href="29_hiding_times.html">29_hiding_times.html</a></p>
<p><a href="30_subgroups.html">30_subgroups.html</a></p>
<p><a href="requirejs/requirejs_example.html">requirejs_example.html</a></p>

+ 2
- 2
lib/network/Node.js View File

@ -878,7 +878,7 @@ Node.prototype._label = function (ctx, text, x, y, align, baseline, labelUnderNo
var lines = text.split('\n');
var lineCount = lines.length;
var fontSize = (Number(this.options.fontSize) + 4);
var fontSize = (Number(this.options.fontSize) + 4); // TODO: why is this +4 ?
var yLine = y + (1 - lineCount) / 2 * fontSize;
if (labelUnderNode == true) {
yLine = y + (1 - lineCount) / (2 * fontSize);
@ -893,7 +893,7 @@ Node.prototype._label = function (ctx, text, x, y, align, baseline, labelUnderNo
var height = this.options.fontSize * lineCount;
var left = x - width / 2;
var top = y - height / 2;
if (ctx.textBaseline == "top") {
if (baseline == "top") {
top += 0.5 * fontSize;
}
this.labelDimensions = {top:top,left:left,width:width,height:height,yLine:yLine};

Loading…
Cancel
Save