Skip to content

Commit

Permalink
fix : interation -> iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
neocarto committed Feb 9, 2022
1 parent 02002f2 commit 4391bbd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ bertin.draw({
- <b>symbol</b>: if it is a dot layer, the type of symbol. "circle", "cross", "diamond", "square", "star", "triangle", "wye" (default: "circle")
- <b>symbol_size</b>: if it is a dot layer, a number indicating the size of the symbol (default: 5)
- <b>symbol_shift</b>: if it is a dot layer, use a value > 0 to swith symbols and avaoid overlay (default: 0)
- <b>symbol_interation</b>: Number of iteration tu shift symbols (default: 200)
- <b>symbol_iteration</b>: Number of iteration tu shift symbols (default: 200)

Parameters of the legend

Expand Down Expand Up @@ -305,7 +305,7 @@ The *bubble* type is used to draw a map by proportional circles. [Source](https:
- <b>strokeWidth</b>: stroke width (default: 0.5)
- <b>fillOpacity</b>: fill opacity (default: 1)
- <b>dorling</b>: a boolean (default:false)
- <b>interation</b> an integer to define the number of iteration for the Dorling method (default 200)
- <b>iteration</b> an integer to define the number of iteration for the Dorling method (default 200)
- <b>tooltip</b> an array of 3 values defing what to display within the tooltip. The two first values indicates the name of a field in the properties. the third value is a string to indicates the unit (default:"")

Parameters of the legend
Expand Down Expand Up @@ -448,7 +448,7 @@ bertin.draw({
- <b>strokeWidth</b>: stroke width (default: 0.5)
- <b>fillOpacity</b>: fill opacity (default: 1)
- <b>tooltip</b> an array of 3 values defing what to display within the tooltip. The two first values indicates the name of a field in the properties. the third value is a string to indicates the unit (default:"")
- <b>interation</b> an integer to define the number of iteration for the Dorling method (default 200)
- <b>iteration</b> an integer to define the number of iteration for the Dorling method (default 200)

Parameters of the legend

Expand Down
6 changes: 3 additions & 3 deletions src/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function draw({ params = {}, layers = {} } = {}) {
fillOpacity: layer.fillOpacity,
symbol: layer.symbol,
symbol_size: layer.symbol_size,
symbol_interation: layer.symbol_interation,
symbol_iteration: layer.symbol_iteration,
symbol_shift: layer.symbol_shift,
tooltip: layer.tooltip,
leg_x: layer.leg_x,
Expand Down Expand Up @@ -404,7 +404,7 @@ if (layer.type == "label") {
leg_strokeWidth: layer.leg_strokeWidth,
leg_fill: layer.leg_fill,
leg_txt: layer.leg_txt

});
}

Expand All @@ -421,7 +421,7 @@ if (layer.type == "label") {
strokeWidth: layer.strokeWidth,
fillOpacity: layer.fillOpacity,
dorling: layer.dorling,
interation: layer.interation,
iteration: layer.iteration,
tooltip: layer.tooltip,
leg_x: layer.leg_x,
leg_y: layer.leg_y,
Expand Down
4 changes: 2 additions & 2 deletions src/layer-bubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function bubble(selection, projection, clipid, options = {}){
let strokeWidth = options.strokeWidth ? options.strokeWidth : 0.5;
let fillOpacity = options.fillOpacity ? options.fillOpacity : 1;
let dorling = options.dorling ? options.dorling : false;
let interation = options.interation ? options.interation : 200;
let iteration = options.iteration ? options.iteration : 200;
let tooltip = options.tooltip ? options.tooltip : "";
//let choro = options.choro ? options.choro : undefined;

Expand Down Expand Up @@ -72,7 +72,7 @@ export function bubble(selection, projection, clipid, options = {}){
d3.forceCollide((d) => radius(Math.abs(d.properties[values])) + strokeWidth / 2)
);

for (let i = 0; i < interation; i++) {
for (let i = 0; i < iteration; i++) {
simulation.tick();
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/layer-simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export function layersimple(selection, projection, clipid, geojson, options = {}
let tooltip = options.tooltip ? options.tooltip : "";
let symbol = options.symbol ? options.symbol : "circle";
let symbol_size = options.symbol_size ? options.symbol_size : 40;
let symbol_interation = options.symbol_interation
? options.symbol_interation
let symbol_iteration = options.symbol_iteration
? options.symbol_iteration
: 200;
let symbol_shift = options.symbol_shift ? options.symbol_shift : 0;

Expand Down Expand Up @@ -119,7 +119,7 @@ export function layersimple(selection, projection, clipid, geojson, options = {}
d3.forceCollide(Math.sqrt(symbol_size) / 2 + symbol_shift / 2)
);

for (let i = 0; i < symbol_interation; i++) {
for (let i = 0; i < symbol_iteration; i++) {
simulation.tick();
}

Expand Down

0 comments on commit 4391bbd

Please sign in to comment.