File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -1463,15 +1463,28 @@ p5.prototype.createSelect = function(...args) {
1463
1463
* @example
1464
1464
* <div>
1465
1465
* <code>
1466
+ * let style = document.createElement('style');
1467
+ * style.innerHTML = `
1468
+ * .p5-radio label {
1469
+ * display: flex;
1470
+ * align-items: center;
1471
+ * }
1472
+ * .p5-radio input {
1473
+ * margin-right: 5px;
1474
+ * }
1475
+ * `;
1476
+ * document.head.appendChild(style);
1477
+ *
1466
1478
* let myRadio;
1467
1479
*
1468
1480
* function setup() {
1469
1481
* createCanvas(100, 100);
1470
1482
*
1471
1483
* // Create a radio button element and place it
1472
- * // in the top-left corner.
1484
+ * // in the top-right corner.
1473
1485
* myRadio = createRadio();
1474
1486
* myRadio.position(0, 0);
1487
+ * myRadio.class('p5-radio');
1475
1488
* myRadio.size(60);
1476
1489
*
1477
1490
* // Add a few color options.
@@ -1535,9 +1548,10 @@ p5.prototype.createSelect = function(...args) {
1535
1548
* createCanvas(100, 100);
1536
1549
*
1537
1550
* // Create a radio button element and place it
1538
- * // in the top-left corner.
1551
+ * // in the top-right corner.
1539
1552
* myRadio = createRadio();
1540
1553
* myRadio.position(0, 0);
1554
+ * myRadio.class('p5-radio');
1541
1555
* myRadio.size(50);
1542
1556
*
1543
1557
* // Add a few color options.
You can’t perform that action at this time.
0 commit comments