From ef009fdc6b6975178fbdd98ec617bb4bb5c4bfac Mon Sep 17 00:00:00 2001 From: Prajyot Tayde Date: Fri, 8 Nov 2024 17:06:47 +0530 Subject: [PATCH 1/2] fixes issue #7366 --- src/dom/dom.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/dom/dom.js b/src/dom/dom.js index d35a53bc74..27137b60cb 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -1463,15 +1463,28 @@ p5.prototype.createSelect = function(...args) { * @example *
* + * let style = document.createElement('style'); + * style.innerHTML = ` + * .p5-radio label { + * display: flex; + * align-items: center; + * } + * .p5-radio input { + * margin-right: 5px; + * } + * `; + * document.head.appendChild(style); + * * let myRadio; * * function setup() { * createCanvas(100, 100); * * // Create a radio button element and place it - * // in the top-left corner. + * // in the top-right corner. * myRadio = createRadio(); * myRadio.position(0, 0); + * myRadio.class('p5-radio'); * myRadio.size(60); * * // Add a few color options. @@ -1535,9 +1548,10 @@ p5.prototype.createSelect = function(...args) { * createCanvas(100, 100); * * // Create a radio button element and place it - * // in the top-left corner. + * // in the top-right corner. * myRadio = createRadio(); * myRadio.position(0, 0); + * myRadio.class('p5-radio'); * myRadio.size(50); * * // Add a few color options. From 53631dca65c5345bae558e84ae91be29b6b23dbb Mon Sep 17 00:00:00 2001 From: Prajyot Tayde <133549235+Prajyot05@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:02:21 +0530 Subject: [PATCH 2/2] change top-right to top-left --- src/dom/dom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dom/dom.js b/src/dom/dom.js index 27137b60cb..cd6ff07bed 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -1481,7 +1481,7 @@ p5.prototype.createSelect = function(...args) { * createCanvas(100, 100); * * // Create a radio button element and place it - * // in the top-right corner. + * // in the top-left corner. * myRadio = createRadio(); * myRadio.position(0, 0); * myRadio.class('p5-radio'); @@ -1548,7 +1548,7 @@ p5.prototype.createSelect = function(...args) { * createCanvas(100, 100); * * // Create a radio button element and place it - * // in the top-right corner. + * // in the top-left corner. * myRadio = createRadio(); * myRadio.position(0, 0); * myRadio.class('p5-radio');