refactor: import d3

This commit is contained in:
Azgaar 2022-07-05 21:12:55 +03:00
parent 1847772d74
commit 98ae3292fc
83 changed files with 709 additions and 69 deletions

View file

@ -1,3 +1,5 @@
import * as d3 from "d3";
import {rn} from "utils/numberUtils";
import {round} from "utils/stringUtils";
import {byId} from "utils/shorthands";

View file

@ -1,3 +1,5 @@
import * as d3 from "d3";
import {getProvincesVertices} from "./drawProvinces";
import {minmax, rn} from "utils/numberUtils";
import {byId} from "utils/shorthands";

View file

@ -1,3 +1,5 @@
import * as d3 from "d3";
export function drawGrid() {
gridOverlay.selectAll("*").remove();
const pattern = "#pattern_" + (gridOverlay.attr("type") || "pointyHex");

View file

@ -1,3 +1,5 @@
import * as d3 from "d3";
import {getColorScheme, getHeightColor} from "utils/colorUtils";
export function drawHeightmap() {

View file

@ -1,3 +1,5 @@
import * as d3 from "d3";
export function drawPopulation(event) {
population.selectAll("line").remove();

View file

@ -1,3 +1,5 @@
import * as d3 from "d3";
export function drawPrecipitation() {
prec.selectAll("circle").remove();
const {cells, points} = grid;

View file

@ -1,3 +1,5 @@
import * as d3 from "d3";
import polylabel from "polylabel";
export function drawStates() {

View file

@ -1,3 +1,5 @@
import * as d3 from "d3";
import {convertTemperature} from "utils/unitUtils";
export function drawTemperature() {