-
Notifications
You must be signed in to change notification settings - Fork 101
/
slicePathTester.html
196 lines (167 loc) · 9.7 KB
/
slicePathTester.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="wheelnav.js slicePath test page">
<meta name="author" content="gabor.berkesi@softwaretailoring.net">
<link rel="shortcut icon" href="wheelnav_favicon.png">
<title>wheelnav.js - slicePath test page</title>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="css/index.css" rel="stylesheet">
<script type="text/javascript" src="js/required/raphael.min.js"></script>
<script type="text/javascript" src="js/required/raphael.icons.js"></script>
<script type="text/javascript" src="js/dist/wheelnav.js"></script>
<script type="text/javascript">
window.onload = function () {
var NullSlice = new wheelnav("NullSlice");
NullSlice.slicePathFunction = slicePath().NullSlice;
NullSlice.titleSelectedAttr = { font: NullSlice.titleFont, fill: "#FFF", cursor: 'default', stroke: "#111" };
NullSlice.createWheel();
var PieSlice = new wheelnav("PieSlice");
PieSlice.slicePathFunction = slicePath().PieSlice;
PieSlice.createWheel();
var DonutSlice = new wheelnav("DonutSlice");
DonutSlice.slicePathFunction = slicePath().DonutSlice;
DonutSlice.createWheel();
var StarSlice = new wheelnav("StarSlice");
StarSlice.slicePathFunction = slicePath().StarSlice;
StarSlice.createWheel(["1", "2", "3", "4", "5"]);
var StarBasePieSlice = new wheelnav("StarBasePieSlice");
StarBasePieSlice.slicePathFunction = slicePath().StarBasePieSlice;
StarBasePieSlice.sliceHoverPathFunction = slicePath().StarSlice;
StarBasePieSlice.createWheel(["1", "2", "3", "4", "5"]);
var CogSlice = new wheelnav("CogSlice");
CogSlice.slicePathFunction = slicePath().CogSlice;
CogSlice.createWheel();
var CogBasePieSlice = new wheelnav("CogBasePieSlice");
CogBasePieSlice.slicePathFunction = slicePath().CogBasePieSlice;
CogBasePieSlice.sliceHoverPathFunction = slicePath().CogSlice;
CogBasePieSlice.createWheel();
var MenuSlice = new wheelnav("MenuSlice");
MenuSlice.slicePathFunction = slicePath().MenuSlice;
MenuSlice.createWheel(["1", "2", "3", "4", "5"]);
var MenuSliceSelectedLine = new wheelnav("MenuSliceSelectedLine");
MenuSliceSelectedLine.slicePathFunction = slicePath().MenuSliceSelectedLine;
MenuSliceSelectedLine.createWheel(["1", "2", "3", "4", "5"]);
var MenuSliceWithoutLine = new wheelnav("MenuSliceWithoutLine");
MenuSliceWithoutLine.slicePathFunction = slicePath().MenuSliceWithoutLine;
MenuSliceWithoutLine.spreaderEnable = true;
MenuSliceWithoutLine.createWheel(["1", "2", "3", "4", "5"]);
var FlowerSlice = new wheelnav("FlowerSlice");
FlowerSlice.slicePathFunction = slicePath().FlowerSlice;
FlowerSlice.createWheel(["1", "2", "3", "4", "5", "6"]);
var EyeSlice = new wheelnav("EyeSlice");
EyeSlice.slicePathFunction = slicePath().EyeSlice;
EyeSlice.createWheel(["1", "2", "3", "4", "5", "6"]);
var LineSlice = new wheelnav("LineSlice");
LineSlice.slicePathFunction = slicePath().LineSlice;
LineSlice.createWheel();
var WheelSlice = new wheelnav("WheelSlice");
WheelSlice.slicePathFunction = slicePath().WheelSlice;
WheelSlice.createWheel();
var OuterStrokeSlice = new wheelnav("OuterStrokeSlice");
OuterStrokeSlice.slicePathFunction = slicePath().OuterStrokeSlice;
OuterStrokeSlice.slicePathAttr = { fill: "#333", cursor: 'pointer', stroke: "#111", "stroke-width": 4 };
OuterStrokeSlice.sliceHoverAttr = { fill: "#333", cursor: 'pointer', stroke: "#111", "stroke-width": 5 };
OuterStrokeSlice.sliceSelectedAttr = { fill: "#333", cursor: 'default', stroke: "#111", "stroke-width": 4 };
OuterStrokeSlice.linePathAttr = { fill: "#333", cursor: 'pointer', stroke: "#111", "stroke-width": 1 };
OuterStrokeSlice.lineHoverAttr = { fill: "#333", cursor: 'pointer', stroke: "#111", "stroke-width": 5 };
OuterStrokeSlice.lineSelectedAttr = { fill: "#333", cursor: 'default', stroke: "#111", "stroke-width": 1 };
OuterStrokeSlice.sliceClickablePathFunction = slicePath().PieSlice;
OuterStrokeSlice.createWheel();
var TabSlice = new wheelnav("TabSlice");
TabSlice.slicePathFunction = slicePath().TabSlice;
TabSlice.clickModeRotate = false;
TabSlice.createWheel();
var YinYangSlice = new wheelnav("YinYangSlice");
YinYangSlice.slicePathFunction = slicePath().YinYangSlice;
YinYangSlice.createWheel(["yin", "yang"]);
var PieArrowSlice = new wheelnav("PieArrowSlice");
PieArrowSlice.slicePathFunction = slicePath().PieArrowBasePieSlice;
PieArrowSlice.sliceSelectedPathFunction = slicePath().PieArrowSlice;
PieArrowSlice.createWheel();
var WebSlice = new wheelnav("WebSlice");
WebSlice.slicePathFunction = slicePath().WebSlice;
WebSlice.titleSelectedAttr = { font: WebSlice.titleFont, fill: "#FFF", cursor: 'default', stroke: "#111" };
WebSlice.createWheel();
var WinterSlice = new wheelnav("WinterSlice");
WinterSlice.slicePathFunction = slicePath().WinterSlice;
WinterSlice.titleSelectedAttr = { font: WinterSlice.titleFont, fill: "#FFF", cursor: 'default', stroke: "#111" };
WinterSlice.createWheel();
var TutorialSlice = new wheelnav("TutorialSlice");
TutorialSlice.slicePathFunction = slicePath().TutorialSlice;
TutorialSlice.titleSelectedAttr = { font: TutorialSlice.titleFont, fill: "#FFF", cursor: 'default', stroke: "#111" };
TutorialSlice.slicePathCustom = slicePath().TutorialSliceCustomization();
TutorialSlice.sliceSelectedPathCustom = slicePath().TutorialSliceCustomization();
TutorialSlice.slicePathCustom.isMoveTo = true;
TutorialSlice.sliceSelectedPathCustom.isMoveTo = true;
TutorialSlice.slicePathCustom.isLineTo = true;
TutorialSlice.sliceSelectedPathCustom.isLineTo = true;
TutorialSlice.slicePathCustom.isArcTo = true;
TutorialSlice.sliceSelectedPathCustom.isArcTo = true;
TutorialSlice.slicePathCustom.isArcBackTo = true;
TutorialSlice.sliceSelectedPathCustom.isArcBackTo = true;
TutorialSlice.createWheel();
};
</script>
</head>
<body>
<header>
<p>
This is a test page for available slicePaths in wheelnav.js library.
For more information please visit the <a href="https://wheelnavjs.softwaretailoring.net" target="_blank">project page</a>
</p>
</header>
<h2>NullSlice</h2>
<div id="NullSlice" class="wheelNav"></div>
<h2>PieSlice</h2>
<div id="PieSlice" class="wheelNav"></div>
<h2>DonutSlice</h2>
<div id="DonutSlice" class="wheelNav"></div>
<h2>StarSlice</h2>
<div id="StarSlice" class="wheelNav"></div>
<h2>StarBasePieSlice</h2>
<div id="StarBasePieSlice" class="wheelNav"></div>
<h2>CogSlice</h2>
<div id="CogSlice" class="wheelNav"></div>
<h2>CogBasePieSlice</h2>
<div id="CogBasePieSlice" class="wheelNav"></div>
<h2>MenuSlice</h2>
<div id="MenuSlice" class="wheelNav"></div>
<h2>MenuSliceSelectedLine</h2>
<div id="MenuSliceSelectedLine" class="wheelNav"></div>
<h2>MenuSliceWithoutLine</h2>
<div id="MenuSliceWithoutLine" class="wheelNav"></div>
<h2>FlowerSlice</h2>
<div id="FlowerSlice" class="wheelNav"></div>
<h2>EyeSlice</h2>
<div id="EyeSlice" class="wheelNav"></div>
<h2>LineSlice</h2>
<div id="LineSlice" class="wheelNav"></div>
<h2>WheelSlice</h2>
<div id="WheelSlice" class="wheelNav"></div>
<h2>OuterStrokeSlice</h2>
<div id="OuterStrokeSlice" class="wheelNav"></div>
<h2>TabSlice</h2>
<div id="TabSlice" class="wheelNav"></div>
<h2>YinYangSlice</h2>
<div id="YinYangSlice" class="wheelNav"></div>
<h2>PieArrowSlice</h2>
<div id="PieArrowSlice" class="wheelNav"></div>
<h2>WebSlice</h2>
<div id="WebSlice" class="wheelNav"></div>
<h2>WinterSlice</h2>
<div id="WinterSlice" class="wheelNav"></div>
<h2>TutorialSlice</h2>
<div id="TutorialSlice" class="wheelNav"></div>
<footer>
<p>© 2014-2021 <a href="https://softwaretailoring.net" target="_blank">softwaretailoring.net</a></p>
</footer>
</body>
</html>