make topic titles have width of 25 chars (#933)
This commit is contained in:
parent
4da3a9d55f
commit
3f161c1076
2 changed files with 4 additions and 4 deletions
|
@ -228,7 +228,7 @@ const JIT = {
|
||||||
ctx.fillStyle = '#FFF'
|
ctx.fillStyle = '#FFF'
|
||||||
ctx.textBaseline = 'alphabetic'
|
ctx.textBaseline = 'alphabetic'
|
||||||
|
|
||||||
const arrayOfLabelLines = Util.splitLine(desc, 30).split('\n')
|
const arrayOfLabelLines = Util.splitLine(desc, 25).split('\n')
|
||||||
let lineWidths = []
|
let lineWidths = []
|
||||||
for (let index = 0; index < arrayOfLabelLines.length; ++index) {
|
for (let index = 0; index < arrayOfLabelLines.length; ++index) {
|
||||||
lineWidths.push(ctx.measureText(arrayOfLabelLines[index]).width)
|
lineWidths.push(ctx.measureText(arrayOfLabelLines[index]).width)
|
||||||
|
@ -497,7 +497,7 @@ const JIT = {
|
||||||
'contains': function(node, pos) {
|
'contains': function(node, pos) {
|
||||||
const npos = node.pos.getc(true)
|
const npos = node.pos.getc(true)
|
||||||
const dim = node.getData('dim')
|
const dim = node.getData('dim')
|
||||||
const arrayOfLabelLines = Util.splitLine(node.name, 30).split('\n')
|
const arrayOfLabelLines = Util.splitLine(node.name, 25).split('\n')
|
||||||
const ctx = Visualize.mGraph.canvas.getCtx()
|
const ctx = Visualize.mGraph.canvas.getCtx()
|
||||||
|
|
||||||
const height = 25 * arrayOfLabelLines.length
|
const height = 25 * arrayOfLabelLines.length
|
||||||
|
@ -1930,7 +1930,7 @@ const JIT = {
|
||||||
minY = y
|
minY = y
|
||||||
}
|
}
|
||||||
|
|
||||||
let arrayOfLabelLines = Util.splitLine(n.name, 30).split('\n')
|
let arrayOfLabelLines = Util.splitLine(n.name, 25).split('\n')
|
||||||
let dim = n.getData('dim')
|
let dim = n.getData('dim')
|
||||||
let ctx = canvas.getCtx()
|
let ctx = canvas.getCtx()
|
||||||
|
|
||||||
|
|
|
@ -7580,7 +7580,7 @@ Graph.Label.Native = new Class({
|
||||||
|
|
||||||
//START METAMAPS CODE
|
//START METAMAPS CODE
|
||||||
|
|
||||||
var arrayOfLabelLines = Metamaps.Util.splitLine(node.name,30).split('\n');
|
var arrayOfLabelLines = Metamaps.Util.splitLine(node.name, 25).split('\n');
|
||||||
//render background
|
//render background
|
||||||
ctx.fillStyle = ctx.strokeStyle = Metamaps.Settings.colors.labels.background;
|
ctx.fillStyle = ctx.strokeStyle = Metamaps.Settings.colors.labels.background;
|
||||||
ctx.lineWidth = 2;
|
ctx.lineWidth = 2;
|
||||||
|
|
Loading…
Reference in a new issue