wisemapping-frontend/packages/web2d/test/javascript/render/arrow.html

78 lines
1.8 KiB
HTML
Raw Normal View History

2021-07-16 16:41:58 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
2021-10-03 02:23:32 +02:00
2021-07-16 16:41:58 +02:00
<head>
2021-10-03 02:23:32 +02:00
<style>
th,
td {
border: 1px solid black;
}
</style>
2021-07-16 16:41:58 +02:00
<script type="text/javascript">
web2d = {
peer: {}
};
web2d.peer =
{
svg: {}
};
web2d.peer.utils = {};
2021-10-03 02:23:32 +02:00
</script>
2021-07-16 16:41:58 +02:00
<script type="text/javascript">
2021-10-03 02:23:32 +02:00
function initialize() {
2021-07-16 16:41:58 +02:00
web2d.Toolkit.init();
2021-10-03 02:23:32 +02:00
var overflowWorkspace = new web2d.Workspace({ fillColor: 'green' });
2021-07-16 16:41:58 +02:00
overflowWorkspace.setSize("200px", "200px");
var arrow = new web2d.Arrow();
2021-10-03 02:23:32 +02:00
arrow.setFrom(50, 50);
arrow.setControlPoint(new core.Point(-50, 0));
2021-07-16 16:41:58 +02:00
overflowWorkspace.append(arrow);
var arrow2 = new web2d.Arrow();
2021-10-03 02:23:32 +02:00
arrow2.setFrom(100, 50);
arrow2.setControlPoint(new core.Point(50, 50));
2021-07-16 16:41:58 +02:00
overflowWorkspace.append(arrow2);
2021-10-03 02:23:32 +02:00
overflowWorkspace.addItAsChildTo($('#overflowExample').first());
2021-07-16 16:41:58 +02:00
}
</script>
</head>
<body onload="initialize();">
2021-10-03 02:23:32 +02:00
<h1>PolyLines Render Tests </h1>
<table>
<colgroup style="width:80%;">
<col style="width:30%" />
<col style="width:60%" />
</colgroup>
<tr>
<td>
Different types of PolyLines that can be used.
</td>
<td>
<div id="overflowExample" />
</td>
</tr>
<tr>
<td>
This is how multiple childs will look in each style line
</td>
<td>
<div id="multipleLineExample" />
</td>
</tr>
</table>
2021-07-16 16:41:58 +02:00
</body>
2021-10-03 02:23:32 +02:00
</html>