@@ -9,8 +9,8 @@ import p5 from './main';
9
9
/**
10
10
* Base class for all elements added to a sketch, including canvas,
11
11
* graphics buffers, and other HTML elements. It is not called directly, but <a href="#/p5.Element">p5.Element</a>
12
- * objects are created by calling <a href="#/p5/createCanvas">createCanvas</a>, <a href="#/p5/createGraphics">createGraphics</a>,
13
- * <a href="#/p5/createDiv">createDiv</a>, <a href="#/p5/createImg">createImg</a>, <a href="#/p5/createInput">createInput</a>, etc.
12
+ * objects are created by calling <a href="#/p5/createCanvas">createCanvas() </a>, <a href="#/p5/createGraphics">createGraphics() </a>,
13
+ * <a href="#/p5/createDiv">createDiv() </a>, <a href="#/p5/createImg">createImg() </a>, <a href="#/p5/createInput">createInput() </a>, etc.
14
14
*
15
15
* @class p5.Element
16
16
* @constructor
@@ -48,7 +48,7 @@ p5.Element = function(elt, pInst) {
48
48
*
49
49
* Attaches the element to the parent specified. A way of setting
50
50
* the container for the element. Accepts either a string ID, DOM
51
- * node, or <a href="#/p5.Element">p5.Element</a>. If no arguments given, parent node is returned.
51
+ * node, or <a href="#/p5.Element">p5.Element</a>. If no arguments are given, parent node is returned.
52
52
* For more ways to position the canvas, see the
53
53
* <a href='https://github.com/processing/p5.js/wiki/Positioning-your-canvas'>
54
54
* positioning the canvas</a> wiki page.
@@ -116,7 +116,7 @@ p5.Element.prototype.parent = function(p) {
116
116
* Sets the ID of the element. If no ID argument is passed in, it instead
117
117
* returns the current ID of the element.
118
118
* Note that only one element can have a particular id in a page.
119
- * The <a href="#/p5.Element/class">. class()</a> function can be used
119
+ * The <a href="#/p5.Element/class">class()</a> method can be used
120
120
* to identify multiple elements with the same class name.
121
121
*
122
122
* @method id
@@ -187,10 +187,10 @@ p5.Element.prototype.class = function(c) {
187
187
} ;
188
188
189
189
/**
190
- * The . <a href="#/p5.Element/mousePressed">mousePressed()</a> function is called
190
+ * The <a href="#/p5.Element/mousePressed">mousePressed()</a> method is called
191
191
* once after every time a mouse button is pressed over the element. Some mobile
192
192
* browsers may also trigger this event on a touch screen, if the user performs
193
- * a quick tap. This can be used to attach element specific event listeners.
193
+ * a quick tap. This can be used to attach element- specific event listeners.
194
194
*
195
195
* @method mousePressed
196
196
* @param {Function|Boolean } fxn function to be fired when mouse is
@@ -244,9 +244,9 @@ p5.Element.prototype.mousePressed = function(fxn) {
244
244
} ;
245
245
246
246
/**
247
- * The . <a href="#/p5.Element/doubleClicked">doubleClicked()</a> function is called once after every time a
247
+ * The <a href="#/p5.Element/doubleClicked">doubleClicked()</a> method is called once after every time a
248
248
* mouse button is pressed twice over the element. This can be used to
249
- * attach element and action specific event listeners.
249
+ * attach element and action- specific event listeners.
250
250
*
251
251
* @method doubleClicked
252
252
* @param {Function|Boolean } fxn function to be fired when mouse is
@@ -290,18 +290,18 @@ p5.Element.prototype.doubleClicked = function(fxn) {
290
290
} ;
291
291
292
292
/**
293
- * The <a href="#/p5.Element/mouseWheel">mouseWheel()</a> function is called
293
+ * The <a href="#/p5.Element/mouseWheel">mouseWheel()</a> method is called
294
294
* once after every time a mouse wheel is scrolled over the element. This can
295
- * be used to attach element specific event listeners.
295
+ * be used to attach element- specific event listeners.
296
296
*
297
- * The function accepts a callback function as argument which will be executed
297
+ * The method accepts a callback function as argument which will be executed
298
298
* when the `wheel` event is triggered on the element, the callback function is
299
299
* passed one argument `event`. The `event.deltaY` property returns negative
300
300
* values if the mouse wheel is rotated up or away from the user and positive
301
301
* in the other direction. The `event.deltaX` does the same as `event.deltaY`
302
302
* except it reads the horizontal wheel scroll of the mouse wheel.
303
303
*
304
- * On OS X with "natural" scrolling enabled, the `event.deltaY` values are
304
+ * On macOS with "natural" scrolling enabled, the `event.deltaY` values are
305
305
* reversed.
306
306
*
307
307
* @method mouseWheel
@@ -352,10 +352,10 @@ p5.Element.prototype.mouseWheel = function(fxn) {
352
352
} ;
353
353
354
354
/**
355
- * The <a href="#/p5.Element/mouseReleased">mouseReleased()</a> function is
355
+ * The <a href="#/p5.Element/mouseReleased">mouseReleased()</a> method is
356
356
* called once after every time a mouse button is released over the element.
357
357
* Some mobile browsers may also trigger this event on a touch screen, if the
358
- * user performs a quick tap. This can be used to attach element specific event listeners.
358
+ * user performs a quick tap. This can be used to attach element- specific event listeners.
359
359
*
360
360
* @method mouseReleased
361
361
* @param {Function|Boolean } fxn function to be fired when mouse is
@@ -401,10 +401,10 @@ p5.Element.prototype.mouseReleased = function(fxn) {
401
401
} ;
402
402
403
403
/**
404
- * The . <a href="#/p5.Element/mouseClicked">mouseClicked()</a> function is
404
+ * The <a href="#/p5.Element/mouseClicked">mouseClicked()</a> method is
405
405
* called once after a mouse button is pressed and released over the element.
406
406
* Some mobile browsers may also trigger this event on a touch screen, if the
407
- * user performs a quick tap.This can be used to attach element specific event listeners.
407
+ * user performs a quick tap. This can be used to attach element- specific event listeners.
408
408
*
409
409
* @method mouseClicked
410
410
* @param {Function|Boolean } fxn function to be fired when mouse is
@@ -452,9 +452,9 @@ p5.Element.prototype.mouseClicked = function(fxn) {
452
452
} ;
453
453
454
454
/**
455
- * The . <a href="#/p5.Element/mouseMoved">mouseMoved()</a> function is called once every time a
455
+ * The <a href="#/p5.Element/mouseMoved">mouseMoved()</a> method is called once every time a
456
456
* mouse moves over the element. This can be used to attach an
457
- * element specific event listener.
457
+ * element- specific event listener.
458
458
*
459
459
* @method mouseMoved
460
460
* @param {Function|Boolean } fxn function to be fired when a mouse moves
@@ -508,9 +508,9 @@ p5.Element.prototype.mouseMoved = function(fxn) {
508
508
} ;
509
509
510
510
/**
511
- * The . <a href="#/p5.Element/mouseOver">mouseOver()</a> function is called once after every time a
511
+ * The <a href="#/p5.Element/mouseOver">mouseOver()</a> method is called once after every time a
512
512
* mouse moves onto the element. This can be used to attach an
513
- * element specific event listener.
513
+ * element- specific event listener.
514
514
*
515
515
* @method mouseOver
516
516
* @param {Function|Boolean } fxn function to be fired when a mouse moves
@@ -549,9 +549,9 @@ p5.Element.prototype.mouseOver = function(fxn) {
549
549
} ;
550
550
551
551
/**
552
- * The . <a href="#/p5.Element/mouseOut">mouseOut()</a> function is called once after every time a
552
+ * The <a href="#/p5.Element/mouseOut">mouseOut()</a> method is called once after every time a
553
553
* mouse moves off the element. This can be used to attach an
554
- * element specific event listener.
554
+ * element- specific event listener.
555
555
*
556
556
* @method mouseOut
557
557
* @param {Function|Boolean } fxn function to be fired when a mouse
@@ -590,8 +590,8 @@ p5.Element.prototype.mouseOut = function(fxn) {
590
590
} ;
591
591
592
592
/**
593
- * The . <a href="#/p5.Element/touchStarted">touchStarted()</a> function is called once after every time a touch is
594
- * registered. This can be used to attach element specific event listeners.
593
+ * The <a href="#/p5.Element/touchStarted">touchStarted()</a> method is called once after every time a touch is
594
+ * registered. This can be used to attach element- specific event listeners.
595
595
*
596
596
* @method touchStarted
597
597
* @param {Function|Boolean } fxn function to be fired when a touch
@@ -637,8 +637,8 @@ p5.Element.prototype.touchStarted = function(fxn) {
637
637
} ;
638
638
639
639
/**
640
- * The . <a href="#/p5.Element/touchMoved">touchMoved()</a> function is called once after every time a touch move is
641
- * registered. This can be used to attach element specific event listeners.
640
+ * The <a href="#/p5.Element/touchMoved">touchMoved()</a> method is called once after every time a touch move is
641
+ * registered. This can be used to attach element- specific event listeners.
642
642
*
643
643
* @method touchMoved
644
644
* @param {Function|Boolean } fxn function to be fired when a touch moves over
@@ -676,8 +676,8 @@ p5.Element.prototype.touchMoved = function(fxn) {
676
676
} ;
677
677
678
678
/**
679
- * The . <a href="#/p5.Element/touchEnded">touchEnded()</a> function is called once after every time a touch is
680
- * registered. This can be used to attach element specific event listeners.
679
+ * The <a href="#/p5.Element/touchEnded">touchEnded()</a> method is called once after every time a touch is
680
+ * registered. This can be used to attach element- specific event listeners.
681
681
*
682
682
* @method touchEnded
683
683
* @param {Function|Boolean } fxn function to be fired when a touch ends
@@ -723,9 +723,9 @@ p5.Element.prototype.touchEnded = function(fxn) {
723
723
} ;
724
724
725
725
/**
726
- * The . <a href="#/p5.Element/dragOver">dragOver()</a> function is called once after every time a
726
+ * The <a href="#/p5.Element/dragOver">dragOver()</a> method is called once after every time a
727
727
* file is dragged over the element. This can be used to attach an
728
- * element specific event listener.
728
+ * element- specific event listener.
729
729
*
730
730
* @method dragOver
731
731
* @param {Function|Boolean } fxn function to be fired when a file is
@@ -761,9 +761,9 @@ p5.Element.prototype.dragOver = function(fxn) {
761
761
} ;
762
762
763
763
/**
764
- * The . dragLeave() function is called once after every time a
764
+ * The <a href="#/p5.Element/ dragLeave">dragLeave()</a> method is called once after every time a
765
765
* dragged file leaves the element area. This can be used to attach an
766
- * element specific event listener.
766
+ * element- specific event listener.
767
767
*
768
768
* @method dragLeave
769
769
* @param {Function|Boolean } fxn function to be fired when a file is
0 commit comments