Skip to content

Commit

Permalink
Code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
yaph committed Sep 29, 2024
1 parent 52951d2 commit 5c2054f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
favicon.ico

data/
dist/
bundle/
Expand Down
6 changes: 3 additions & 3 deletions examples/country-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@
let countries = d3.geomap()
.geofile('../dist/topojson/world/countries.json')
.postUpdate(drawCountries);
let container = d3.select('#main');
const container = d3.select('#main');

countries.draw(container);
container.selectAll('*').remove();

function drawCountries() {
for (let geometry of countries.geo.objects.units.geometries) {
let map_container = container.append('div')
const map_container = container.append('div')
.attr('id', geometry.properties.iso3)
.attr('class', 'country');
map_container.append('h2').text(geometry.properties.name);

let country = d3.geomap()
const country = d3.geomap()
.geofile(`../dist/topojson/countries/${geometry.properties.iso3}.json`)
.postUpdate(_ => map_container.select('path').dispatch('click'));

Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import postcss from 'rollup-plugin-postcss';
import babel from '@rollup/plugin-babel';
import terser from '@rollup/plugin-terser';

import meta from './package.json' assert { type: "json" };
import meta from './package.json' assert { type: 'json' };


function makeCssConfig({ minimize = false } = {}) {
Expand Down

0 comments on commit 5c2054f

Please sign in to comment.