@@ -753,22 +753,14 @@ p5.Element.prototype.touchEnded = function (fxn) {
753
753
* textAlign(CENTER);
754
754
* text('Drag file', width/2, height/2);
755
755
* c.dragOver(dragOverCallback);
756
- * c.dragLeave(dragLeaveCallback);
757
756
* }
758
- *
757
+ *
759
758
* // This function will be called whenever
760
759
* // a file is dragged over the canvas
761
760
* function dragOverCallback() {
762
761
* background(240);
763
762
* text('Dragged over', width/2, height/2);
764
763
* }
765
- *
766
- * // This function will be called whenever
767
- * // a file is dragged out of the canvas
768
- * function dragLeaveCallback() {
769
- * background(200);
770
- * text('Dragged off', width/2, height/2);
771
- * }
772
764
* </code></div>
773
765
* @alt
774
766
* nothing displayed
@@ -789,28 +781,20 @@ p5.Element.prototype.dragOver = function (fxn) {
789
781
* @return {p5.Element }
790
782
* @example
791
783
* <div><code>
792
- * // To test this sketch, simply drag a
793
- * // file over the canvas
784
+ * // To test this sketch, simply drag a file
785
+ * // over and then out of the canvas area
794
786
* function setup() {
795
787
* var c = createCanvas(100, 100);
796
788
* background(200);
797
789
* textAlign(CENTER);
798
790
* text('Drag file', width/2, height/2);
799
- * c.dragOver(dragOverCallback);
800
791
* c.dragLeave(dragLeaveCallback);
801
792
* }
802
- *
803
- * // This function will be called whenever
804
- * // a file is dragged over the canvas
805
- * function dragOverCallback() {
806
- * background(240);
807
- * text('Dragged over', width/2, height/2);
808
- * }
809
- *
793
+ *
810
794
* // This function will be called whenever
811
- * // a file is dragged out of the canvas
795
+ * // a file is dragged out of the canvas
812
796
* function dragLeaveCallback() {
813
- * background(200 );
797
+ * background(240 );
814
798
* text('Dragged off', width/2, height/2);
815
799
* }
816
800
* </code></div>
0 commit comments