@@ -225,7 +225,7 @@ p5.prototype._wrapElement = function (elt) {
225
225
const children = Array . prototype . slice . call ( elt . children ) ;
226
226
if ( elt . tagName === 'INPUT' && elt . type === 'checkbox' ) {
227
227
let converted = new p5 . Element ( elt , this ) ;
228
- converted . checked = function ( ...args ) {
228
+ converted . checked = function ( ...args ) {
229
229
if ( args . length === 0 ) {
230
230
return this . elt . checked ;
231
231
} else if ( args [ 0 ] ) {
@@ -1020,7 +1020,7 @@ p5.prototype.createButton = function (label, value) {
1020
1020
*
1021
1021
* @method createCheckbox
1022
1022
* @param {String } [label] label displayed after the checkbox.
1023
- * @param {boolean } [value] value of the checkbox. Checked is `true` and unchecked is `false`.
1023
+ * @param {Boolean } [value] value of the checkbox. Checked is `true` and unchecked is `false`.
1024
1024
* @return {p5.Element } new <a href="#/p5.Element">p5.Element</a> object.
1025
1025
*
1026
1026
* @example
@@ -1101,7 +1101,7 @@ p5.prototype.createButton = function (label, value) {
1101
1101
* </code>
1102
1102
* </div>
1103
1103
*/
1104
- p5 . prototype . createCheckbox = function ( ...args ) {
1104
+ p5 . prototype . createCheckbox = function ( ...args ) {
1105
1105
p5 . _validateParameters ( 'createCheckbox' , args ) ;
1106
1106
1107
1107
// Create a container element
@@ -1121,7 +1121,7 @@ p5.prototype.createCheckbox = function(...args) {
1121
1121
//checkbox must be wrapped in p5.Element before label so that label appears after
1122
1122
const self = addElement ( elt , this ) ;
1123
1123
1124
- self . checked = function ( ...args ) {
1124
+ self . checked = function ( ...args ) {
1125
1125
const cb = self . elt . firstElementChild . getElementsByTagName ( 'input' ) [ 0 ] ;
1126
1126
if ( cb ) {
1127
1127
if ( args . length === 0 ) {
@@ -1178,7 +1178,7 @@ p5.prototype.createCheckbox = function(...args) {
1178
1178
* - `mySelect.enable(option)` marks a given option as enabled.
1179
1179
*
1180
1180
* @method createSelect
1181
- * @param {boolean } [multiple] support multiple selections.
1181
+ * @param {Boolean } [multiple] support multiple selections.
1182
1182
* @return {p5.Element } new <a href="#/p5.Element">p5.Element</a> object.
1183
1183
*
1184
1184
* @example
@@ -1328,7 +1328,7 @@ p5.prototype.createCheckbox = function(...args) {
1328
1328
* @return {p5.Element }
1329
1329
*/
1330
1330
1331
- p5 . prototype . createSelect = function ( ...args ) {
1331
+ p5 . prototype . createSelect = function ( ...args ) {
1332
1332
p5 . _validateParameters ( 'createSelect' , args ) ;
1333
1333
let self ;
1334
1334
let arg = args [ 0 ] ;
@@ -1580,7 +1580,7 @@ p5.prototype.createSelect = function(...args) {
1580
1580
* @method createRadio
1581
1581
* @return {p5.Element } new <a href="#/p5.Element">p5.Element</a> object.
1582
1582
*/
1583
- p5 . prototype . createRadio = function ( ...args ) {
1583
+ p5 . prototype . createRadio = function ( ...args ) {
1584
1584
// Creates a div, adds each option as an individual input inside it.
1585
1585
// If already given with a containerEl, will search for all input[radio]
1586
1586
// it, create a p5.Element out of it, add options to it and return the p5.Element.
@@ -2394,7 +2394,7 @@ if (navigator.mediaDevices.getUserMedia === undefined) {
2394
2394
* </code>
2395
2395
* </div>
2396
2396
*/
2397
- p5 . prototype . createCapture = function ( ...args ) {
2397
+ p5 . prototype . createCapture = function ( ...args ) {
2398
2398
p5 . _validateParameters ( 'createCapture' , args ) ;
2399
2399
2400
2400
// return if getUserMedia is not supported by the browser
@@ -2436,7 +2436,7 @@ p5.prototype.createCapture = function(...args) {
2436
2436
domElement . src = window . URL . createObjectURL ( stream ) ;
2437
2437
}
2438
2438
}
2439
- catch ( err ) {
2439
+ catch ( err ) {
2440
2440
domElement . src = stream ;
2441
2441
}
2442
2442
} ) . catch ( e => {
@@ -2467,7 +2467,7 @@ p5.prototype.createCapture = function(...args) {
2467
2467
2468
2468
if ( callback ) callback ( domElement . srcObject ) ;
2469
2469
} ) ;
2470
- videoEl . flipped = flipped ;
2470
+ videoEl . flipped = flipped ;
2471
2471
return videoEl ;
2472
2472
} ;
2473
2473
@@ -2944,10 +2944,10 @@ p5.Element.prototype.center = function (align) {
2944
2944
/**
2945
2945
* @method html
2946
2946
* @param {String } [html] the HTML to be placed inside the element
2947
- * @param {boolean } [append] whether to append HTML to existing
2947
+ * @param {Boolean } [append] whether to append HTML to existing
2948
2948
* @chainable
2949
2949
*/
2950
- p5 . Element . prototype . html = function ( ...args ) {
2950
+ p5 . Element . prototype . html = function ( ...args ) {
2951
2951
if ( args . length === 0 ) {
2952
2952
return this . elt . innerHTML ;
2953
2953
} else if ( args [ 1 ] ) {
@@ -3017,7 +3017,7 @@ p5.Element.prototype.html = function(...args) {
3017
3017
* @param {String } [positionType] it can be static, fixed, relative, sticky, initial or inherit (optional)
3018
3018
* @chainable
3019
3019
*/
3020
- p5 . Element . prototype . position = function ( ...args ) {
3020
+ p5 . Element . prototype . position = function ( ...args ) {
3021
3021
if ( args . length === 0 ) {
3022
3022
return { x : this . elt . offsetLeft , y : this . elt . offsetTop } ;
3023
3023
} else {
@@ -3042,7 +3042,7 @@ p5.Element.prototype.position = function(...args) {
3042
3042
} ;
3043
3043
3044
3044
/* Helper method called by p5.Element.style() */
3045
- p5 . Element . prototype . _translate = function ( ...args ) {
3045
+ p5 . Element . prototype . _translate = function ( ...args ) {
3046
3046
this . elt . style . position = 'absolute' ;
3047
3047
// save out initial non-translate transform styling
3048
3048
let transform = '' ;
@@ -3074,7 +3074,7 @@ p5.Element.prototype._translate = function(...args) {
3074
3074
} ;
3075
3075
3076
3076
/* Helper method called by p5.Element.style() */
3077
- p5 . Element . prototype . _rotate = function ( ...args ) {
3077
+ p5 . Element . prototype . _rotate = function ( ...args ) {
3078
3078
// save out initial non-rotate transform styling
3079
3079
let transform = '' ;
3080
3080
if ( this . elt . style . transform ) {
@@ -3461,7 +3461,7 @@ p5.Element.prototype.removeAttribute = function (attr) {
3461
3461
* @param {String|Number } value
3462
3462
* @chainable
3463
3463
*/
3464
- p5 . Element . prototype . value = function ( ...args ) {
3464
+ p5 . Element . prototype . value = function ( ...args ) {
3465
3465
if ( args . length > 0 ) {
3466
3466
this . elt . value = args [ 0 ] ;
3467
3467
return this ;
@@ -4004,10 +4004,10 @@ p5.Element.prototype.draggable = function (elmMove) {
4004
4004
closeDragElementEvt = isTouch ? 'touchend' : 'mouseup' ,
4005
4005
elementDragEvt = isTouch ? 'touchmove' : 'mousemove' ;
4006
4006
4007
- if ( elmMove === undefined ) {
4007
+ if ( elmMove === undefined ) {
4008
4008
elmMove = this . elt ;
4009
4009
elmDrag = elmMove ;
4010
- } else if ( elmMove !== this . elt && elmMove . elt !== this . elt ) {
4010
+ } else if ( elmMove !== this . elt && elmMove . elt !== this . elt ) {
4011
4011
elmMove = elmMove . elt ;
4012
4012
elmDrag = this . elt ;
4013
4013
}
@@ -4018,11 +4018,11 @@ p5.Element.prototype.draggable = function (elmMove) {
4018
4018
function dragMouseDown ( e ) {
4019
4019
e = e || window . event ;
4020
4020
4021
- if ( isTouch ) {
4021
+ if ( isTouch ) {
4022
4022
const touches = e . changedTouches ;
4023
4023
px = parseInt ( touches [ 0 ] . clientX ) ;
4024
4024
py = parseInt ( touches [ 0 ] . clientY ) ;
4025
- } else {
4025
+ } else {
4026
4026
px = parseInt ( e . clientX ) ;
4027
4027
py = parseInt ( e . clientY ) ;
4028
4028
}
@@ -4035,13 +4035,13 @@ p5.Element.prototype.draggable = function (elmMove) {
4035
4035
function elementDrag ( e ) {
4036
4036
e = e || window . event ;
4037
4037
4038
- if ( isTouch ) {
4038
+ if ( isTouch ) {
4039
4039
const touches = e . changedTouches ;
4040
4040
x = px - parseInt ( touches [ 0 ] . clientX ) ;
4041
4041
y = py - parseInt ( touches [ 0 ] . clientY ) ;
4042
4042
px = parseInt ( touches [ 0 ] . clientX ) ;
4043
4043
py = parseInt ( touches [ 0 ] . clientY ) ;
4044
- } else {
4044
+ } else {
4045
4045
x = px - parseInt ( e . clientX ) ;
4046
4046
y = py - parseInt ( e . clientY ) ;
4047
4047
px = parseInt ( e . clientX ) ;
@@ -4950,7 +4950,7 @@ p5.MediaElement = class MediaElement extends p5.Element {
4950
4950
* set this value to false after uploading the texture; or might set
4951
4951
* it to true if metadata has become available but there is no actual
4952
4952
* texture data available yet..
4953
- * @param {boolean } val sets whether or not the element has been
4953
+ * @param {Boolean } val sets whether or not the element has been
4954
4954
* modified.
4955
4955
* @private
4956
4956
*/
0 commit comments