jsxgraph axis label positioning
by migerh
HTML
<link rel="stylesheet" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css">
<script src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
<div id='box' class='jxgbox'></div>
CSS
#box {
width:500px;
height:500px;
background-color: navy;
}
JavaScript
var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-10, 10, 10, -10], showNavigation: false});
// create a point
var P = board.create('point', [3, 3], {withLabel: false});
// create an image with the bottom left corner bound to the point
var img = board.create('image', ['http://jsfiddle.net/img/logo.png', [function () {
return P.X();
}, function () {
return P.Y();
}], [4, 1]]);
// not a point, but you'll get the idea
var L = board.create('line', [1, 2, 3], {strokeColor: 'green', strokeWidth: 4, visible: false});
img.on('over', function () {
// do something when the user enters the image
L.setProperty({visible: true});
});
img.on('out', function () {
// do something when the user leaves the image
L.setProperty({visible: false});
});