Skip to content

Commit ef009fd

Browse files
committed
fixes issue processing#7366
1 parent cfc17d3 commit ef009fd

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/dom/dom.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,15 +1463,28 @@ p5.prototype.createSelect = function(...args) {
14631463
* @example
14641464
* <div>
14651465
* <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+
*
14661478
* let myRadio;
14671479
*
14681480
* function setup() {
14691481
* createCanvas(100, 100);
14701482
*
14711483
* // Create a radio button element and place it
1472-
* // in the top-left corner.
1484+
* // in the top-right corner.
14731485
* myRadio = createRadio();
14741486
* myRadio.position(0, 0);
1487+
* myRadio.class('p5-radio');
14751488
* myRadio.size(60);
14761489
*
14771490
* // Add a few color options.
@@ -1535,9 +1548,10 @@ p5.prototype.createSelect = function(...args) {
15351548
* createCanvas(100, 100);
15361549
*
15371550
* // Create a radio button element and place it
1538-
* // in the top-left corner.
1551+
* // in the top-right corner.
15391552
* myRadio = createRadio();
15401553
* myRadio.position(0, 0);
1554+
* myRadio.class('p5-radio');
15411555
* myRadio.size(50);
15421556
*
15431557
* // Add a few color options.

0 commit comments

Comments
 (0)