Skip to content

Commit b06474e

Browse files
author
Patric Gutersohn
committed
Half Circle still uses full dimenison pguso#25
1 parent 31de5c0 commit b06474e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

js/jquery.circliful.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
if (type == 'half') {
122122
startAngle = 2.0 * Math.PI;
123123
endAngle = 3.13;
124-
circ = Math.PI * 1.0;
124+
circ = Math.PI;
125125
quart = Math.PI / 0.996;
126126
}
127127
}
@@ -131,7 +131,12 @@
131131

132132
function respondCanvas() {
133133
$(canvas).attr('width', $(container).width()); //max width
134-
$(canvas).attr('height', $(container).height()); //max height
134+
135+
if(type == 'half') {
136+
$(canvas).attr('height', $(container).height() / 2); //max height
137+
} else {
138+
$(canvas).attr('height', $(container).height()); //max height
139+
}
135140

136141
//Call a function to redraw other content (texts, images etc)
137142
}
@@ -197,6 +202,7 @@
197202
* @param current
198203
*/
199204
function animate(current) {
205+
200206
context.clearRect(0, 0, canvas.width, canvas.height);
201207

202208
context.beginPath();

js/jquery.circliful.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)