fixed label placement on safari
This commit is contained in:
parent
5725007e78
commit
7bf87c7a4b
2 changed files with 6 additions and 5 deletions
|
@ -7493,7 +7493,7 @@ Graph.Label.Native = new Class({
|
||||||
// START METAMAPS CODE
|
// START METAMAPS CODE
|
||||||
var index;
|
var index;
|
||||||
for (index = 0; index < customLabel.length; ++index) {
|
for (index = 0; index < customLabel.length; ++index) {
|
||||||
ctx.fillText(customLabel[index], pos.x, pos.y + node.getData("height") + 9 + (25*index));
|
ctx.fillText(customLabel[index], pos.x, pos.y + node.getData("height") + 6 + (25*index));
|
||||||
}
|
}
|
||||||
// END METAMAPS CODE
|
// END METAMAPS CODE
|
||||||
},
|
},
|
||||||
|
|
|
@ -175,7 +175,8 @@ Metamaps.JIT = {
|
||||||
context.fillStyle = '#424242';
|
context.fillStyle = '#424242';
|
||||||
context.textAlign = 'center';
|
context.textAlign = 'center';
|
||||||
context.font = '14px din-medium';
|
context.font = '14px din-medium';
|
||||||
context.fillText(count, x, y - 6);
|
|
||||||
|
context.fillText(count, x, y - 9);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!canvas.denySelected && desc != "" && showDesc) {
|
if (!canvas.denySelected && desc != "" && showDesc) {
|
||||||
|
@ -186,7 +187,7 @@ Metamaps.JIT = {
|
||||||
var ctx = canvas.getCtx();
|
var ctx = canvas.getCtx();
|
||||||
ctx.font = 'bold 14px arial';
|
ctx.font = 'bold 14px arial';
|
||||||
ctx.fillStyle = '#FFF';
|
ctx.fillStyle = '#FFF';
|
||||||
ctx.textBaseline = 'hanging';
|
ctx.textBaseline = 'top';
|
||||||
|
|
||||||
var arrayOfLabelLines = Metamaps.Util.splitLine(desc, 30).split('\n');
|
var arrayOfLabelLines = Metamaps.Util.splitLine(desc, 30).split('\n');
|
||||||
var index, lineWidths = [];
|
var index, lineWidths = [];
|
||||||
|
@ -222,7 +223,7 @@ Metamaps.JIT = {
|
||||||
ctx.fillStyle = '#424242';
|
ctx.fillStyle = '#424242';
|
||||||
ctx.textAlign = 'center';
|
ctx.textAlign = 'center';
|
||||||
for (index = 0; index < arrayOfLabelLines.length; ++index) {
|
for (index = 0; index < arrayOfLabelLines.length; ++index) {
|
||||||
ctx.fillText(arrayOfLabelLines[index], x + (width / 2), y + 7 + (16 * index));
|
ctx.fillText(arrayOfLabelLines[index], x + (width / 2), y + 4 + (16 * index));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (synapseNum > 1) {
|
if (synapseNum > 1) {
|
||||||
|
@ -306,7 +307,7 @@ Metamaps.JIT = {
|
||||||
type: 'Native', //Native or HTML
|
type: 'Native', //Native or HTML
|
||||||
size: 20,
|
size: 20,
|
||||||
family: 'arial',
|
family: 'arial',
|
||||||
textBaseline: 'hanging',
|
textBaseline: 'top',
|
||||||
color: Metamaps.Settings.colors.labels.text
|
color: Metamaps.Settings.colors.labels.text
|
||||||
},
|
},
|
||||||
//Add Tips
|
//Add Tips
|
||||||
|
|
Loading…
Add table
Reference in a new issue