Files
svg2cube/svgCube.html
T
2016-01-17 18:47:07 +08:00

42 lines
1.1 KiB
HTML
Executable File

<!-- Non gui version of svgCube_gui.html for webdriver converions to svg -->
<html>
<head>
<meta charset="utf-8">
<title>svg2Cube</title>
</head>
<body>
<div style="display: none;" id="dimensions">
</input>
</body>
<script type="text/javascript" src="node_modules/snapsvg/dist/snap.svg.js"></script>
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="projectSVG.js"></script>
<script>
var cube1
window.onload = function() {
cube1 = new SvgCube({
rotateX: 45,
svgPanel: 'inputs/panels.svg',
clipCircle: false,
stroke: {
"stroke": 'black', // stroke color for outline
"stroke-width": 0, // outline width
},
size: 444,
});
var text = cube1.getBounds();
// Get dimensions of each pane and make it accesable to webdriver
$('#dimensions').attr('value', 1)
$('#dimensions').text(JSON.stringify(text))
}
</script>
</html>