-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
109 lines (108 loc) · 3.35 KB
/
index.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JalSoft Web CAD - SVG Design</title>
<style>
*{
padding:0;
margin:0;
}
body {
font-family: Arial;
color:#fff;
background: #333;
}
#svgCanvas {
border: 1px solid black;
width: 600px;
height: 700px;
background-color: #fff;
}
#tools button {
margin: 5px;
padding:5px;
border-radius: 5px;
color:#fff;
background: #333;
cursor:pointer;
width:90px;
border:1px solid #dde;
}
#tools {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
padding:5px 5px;
position:fixed;
top:85px;
left:0;
background-color:rgba(96,96,96);
width:140px;
}
.draw-page {
margin-left:150px;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #dde;
margin-top: 50px;
margin-bottom:75px;
}
footer {
position:fixed;
bottom:0px;
right:0px;
height:70px;
display:flex;
align-items: center;
justify-content: center;
width:100%;
background:#333;
}
.fillColor {
position:relative;
width:50px;
height:18px;
border:1px solid #ddd;
border-radius: 5px;
}
.fillColor span {
position:absolute;
background:#ffffff60;
top:-25px;
left:0px;
padding:2px 2px;
}
</style>
</head>
<body>
<h1>JalSoft Web CAD - SVG Design</h1>
<div id="tools">
<button onclick="startDrawing('rect')">Rectangle</button>
<button onclick="startDrawing('line')">Line</button>
<button onclick="startDrawing('circle')">Circle</button>
<button onclick="startDrawing('ellipse')">Ellipse</button>
<button onclick="startDrawing('polygon')">Polygon</button>
<button onclick="startFreehand()">Freehand</button>
<button onclick="clearCanvas()">Clear</button>
<button onclick="saveSVG()">Save SVG</button>
</div>
<div class="draw-page">
<svg id="svgCanvas" xmlns="http://www.w3.org/2000/svg">
<!-- /*Drawn By JalSoft CAD*/ -->
</svg>
</div>
<footer>
<div id="fill"><label for="fill-color">Fill</label><input type="color" id="fill-color" value="#999999"><input onclick="resetFill()" type="button" value="none"></div>
<div id="stroke"><label for="stroke-color">Stroke color</label><input type="color" id="stroke-color"></div>
<div id="stroke-width"><input type="number" id="stroke-width" value="3"></div>
<button class="fillColor"><span>Blue</span></button>
</footer>
<script src="./script.js">
</script>
</body>
</html>