ポリゴンのラベル位置を変更するにはどうすればよいですか?
p = this.board.create('polygon',[p1,p2,p4,p3],{
withLines:false,
withLabel: true,
name: function () {
return "lala " + p1.Dist(p2).toFixed(2) + "m";
},
id: p3.X() + "_" + p4.Y()
});
ポリゴンのラベル位置を変更するにはどうすればよいですか?
p = this.board.create('polygon',[p1,p2,p4,p3],{
withLines:false,
withLabel: true,
name: function () {
return "lala " + p1.Dist(p2).toFixed(2) + "m";
},
id: p3.X() + "_" + p4.Y()
});
JSXGraphでは、ポリゴンラベルはデフォルトで中央に配置されます。ラベルでオフセット値(ピクセル単位)を指定できます:{offset:[xoff、yoff]}
http://jsxgraph.uni-bayreuth.de/wiki/index.php/Positioning_of_labelsを参照してください。