forked from ecomfe/fonteditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboundSegmentCross.html
51 lines (49 loc) · 1.2 KB
/
boundSegmentCross.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>bound和线段相交</title>
<script src="../dep/esl.js"></script>
<script src="../dep/jquery.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
.point {
position: absolute;
width: 9px;
height: 9px;
margin-left: -5px;
margin-top: -5px;
border: 1px solid red;
}
[data-index="0"], [data-index="1"] {
border-color: green
}
</style>
</head>
<body>
<div class="point" data-index="0"></div>
<div class="point" data-index="1"></div>
<div class="point" data-index="2"></div>
<div class="point" data-index="3"></div>
<canvas id="canvas" width="500" height="500"></canvas>
<script>
require.config({
baseUrl: '../src',
packages: [
{
name: 'fonteditor-core',
location: '../dep/fonteditor-core/src'
}
],
paths: {
demo: '../demo/js',
}
});
define('jquery', $);
</script>
<script>require(['demo/boundSegmentCross'])</script>
</body>
</html>