Skip to content

Commit 5ecc235

Browse files
committed
Adding 'controls' option.
1 parent 04313a3 commit 5ecc235

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

LOGO/jquery.LOGO.js

+11-10
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,24 @@
2727
var $turtle = $('<canvas class="turtle" width="'+o.width+'" height="'+o.height+'" style="position: absolute; top:0px; left:0px;" />');
2828
var $drawing = $('<canvas class="drawing" width="'+o.width+'" height="'+o.height+'" style="position: absolute; top:0px; left:0px;" />');
2929
$wrapper.append($turtle).append($drawing);
30+
$this.append($wrapper);
3031

3132
// Make a control area, append it in
32-
var $controls = $('<ul class="controls" />');
33-
$controls.append('<li>Junk Control</li>');
34-
$controls.append('<li>Junk Control</li>');
35-
$controls.append('<li>Junk Control</li>');
36-
37-
// Push the pieces into our current item
38-
$this.append($wrapper);
39-
$this.append($controls);
33+
if (o.controls) {
34+
var $controls = $('<ul class="controls" />');
35+
$controls.append('<li>Junk Control</li>');
36+
$controls.append('<li>Junk Control</li>');
37+
$controls.append('<li>Junk Control</li>');
38+
$this.append($controls);
39+
} // if (o.controls)
4040
}); // return this.each(function()
4141
}; // $.fn.LOGO = function(options)
4242

4343
// ===== DEFAULTS =====
4444
$.fn.LOGO.defaults = {
45-
'width': 500,
46-
'height': 500
45+
'width': 500,
46+
'height': 500,
47+
'controls': true
4748
};
4849

4950
// ===== FUNCTIONS =====

0 commit comments

Comments
 (0)