Skip to content

Commit 6c28d1a

Browse files
authored
Update dataMappingGuide.js
1 parent cd16cfd commit 6c28d1a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dataMappingGuide.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
* - `canvas`: a canvas element
1717
* - `src`: an optional filename or pathname of an image for background
1818
*=== Methods ===
19-
*### 1) resizing and background ###
19+
*### 1) Resizing and background ###
2020
* - `resize(w,h,src)`; it sets canvas size and background image
2121
* - `setDivisions(x,y)`; it sets horizontal and vertical divisions
2222
* - `w` and `h`: new values for canvas width and canvas height
2323
* - `src`: filename or pathname of an image; 'none' is default value
2424
* - `x` and `y`: numbers for horizontal and vertical divisions
25-
*### 2) colors ###
25+
*### 2) Colors ###
2626
* - `setColor(rgb,alpha)`; it sets rgb color and alpha value
2727
* - `rgb`: rgb color value
2828
* - `alpha`: an optional value between 0.0 (fully transparent) and 1.0 (fully opaque)
29-
*### 3) focus area ###
29+
*### 3) Focus area ###
3030
* - `xy(x,y)`; it puts focus on a area that is specified using integer coordinates
3131
* - `x` and `y`: positive integer indices for horizontal and vertical divisions
32-
*### other methods ###
32+
*### Other methods ###
3333
* - `clear()`; it clears canvas
3434
* - `next()`; it returns coordinates for the next focus area as form of [x,y]
3535
* - `info()`; it returns the current state of sampling
@@ -65,7 +65,7 @@ function dataMappingGuide(canvas,src){
6565
cvs.img=!src?'none':src;
6666
canvas.style.backgroundRepeat='no-repeat';
6767
canvas.style.backgroundImage=!src?'none':'url('+src+')';
68-
//### 1) resizing and background ###
68+
//### 1) Resizing and background ###
6969
//it sets canvas size and background image
7070
cvs.resize=function(w,h,src){
7171
// - w and h: new values for canvas width and canvas height
@@ -94,7 +94,7 @@ function dataMappingGuide(canvas,src){
9494
cvs.dh=+canvas.height/cvs.Ny;
9595
return [cvs.Nx,cvs.Ny];
9696
};
97-
//### 2) colors ###
97+
//### 2) Colors ###
9898
//it sets rgb color and alpha value
9999
cvs.setColor=function(rgb,alpha){
100100
// - rgb: rgb color value
@@ -103,7 +103,7 @@ function dataMappingGuide(canvas,src){
103103
cvs.alpha=!alpha?cvs.alpha:alpha;
104104
return [cvs.color,cvs.alpha];
105105
};
106-
//### 3) focus area ###
106+
//### 3) Focus area ###
107107
//it puts focus on a area that is specified using integer coordinates
108108
cvs.xy=function(x,y){
109109
// - `x` and `y`: positive integer indices for horizontal and vertical divisions
@@ -138,7 +138,7 @@ function dataMappingGuide(canvas,src){
138138
ctx=null;
139139
return [cvs.X,cvs.Y];
140140
};
141-
//### other methods ###
141+
//### Other methods ###
142142
//it clears canvas
143143
cvs.clear=function(){
144144
var ctx=canvas.getContext('2d');

0 commit comments

Comments
 (0)