gridviz 2.0.29 → 2.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -1
- package/dist/gridviz.js +27830 -27750
- package/dist/gridviz.min.js +1 -1
- package/package.json +8 -5
- package/src/App.js +44 -14
- package/src/dataset/COGeo.js +1 -1
- package/src/dataset/CSVGrid.js +1 -2
- package/src/dataset/GeoTIFF.js +1 -1
- package/src/dataset/ParquetGrid.js +1 -2
- package/src/dataset/TiledGrid.js +7 -5
- package/src/index.js +52 -51
- package/src/legend/ColorCategoryLegend.js +1 -1
- package/src/legend/ColorDiscreteLegend.js +1 -1
- package/src/legend/ColorLegend.js +1 -1
- package/src/legend/SegmentOrientationLegend.js +1 -1
- package/src/legend/SegmentWidthLegend.js +1 -1
- package/src/legend/SizeLegend.js +1 -1
- package/src/style/CompositionStyle.js +12 -6
- package/src/style/ContourStyle.js +1 -1
- package/src/style/DotDensityStyle.js +4 -4
- package/src/style/JoyPlotStyle.js +1 -1
- package/src/style/KernelSmoothingOldStyle.js +1 -1
- package/src/style/KernelSmoothingStyle.js +1 -1
- package/src/style/KernelSmoothingWGLStyle.js +1 -1
- package/src/style/LegoStyle.js +4 -4
- package/src/style/MosaicStyle.js +1 -1
- package/src/style/NinjaStarStyle.js +2 -2
- package/src/style/PillarStyle.js +1 -1
- package/src/style/SegmentStyle.js +1 -1
- package/src/style/ShapeColorSizeStyle.js +1 -1
- package/src/style/SideCatStyle.js +1 -1
- package/src/style/SideStyle.js +1 -1
- package/src/style/SquareColorCatWGLStyle.js +4 -4
- package/src/style/SquareColorWGLStyle.js +4 -4
- package/src/style/StrokeStyle.js +1 -1
- package/src/style/TanakaStyle.js +2 -2
- package/src/style/TextStyle.js +1 -1
- package/src/utils/WebGLRectangleColoring.js +1 -1
- package/src/utils/WebGLSquareColoring.js +1 -1
- package/src/utils/WebGLSquareColoringAdvanced.js +1 -1
- package/src/utils/WebGLSquareColoringCatAdvanced.js +1 -1
- package/src/utils/WebGLSquareColoringKS.js +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gridviz",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.32",
|
|
4
4
|
"description": "Visualization tool for gridded statistics",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"keywords": [
|
|
7
6
|
"statistics",
|
|
8
7
|
"grid",
|
|
@@ -28,6 +27,7 @@
|
|
|
28
27
|
"url": "https://github.com/eurostat/gridviz/issues",
|
|
29
28
|
"email": "Joseph.DAVIES@ext.ec.europa.eu"
|
|
30
29
|
},
|
|
30
|
+
"type": "module",
|
|
31
31
|
"main": "dist/gridviz.min.js",
|
|
32
32
|
"module": "dist/gridviz.min.js",
|
|
33
33
|
"exports": {
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"default": "./src/index.js"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
|
-
"start": "export NODE_OPTIONS=--openssl-legacy-provider && webpack --config webpack.config.dev.
|
|
39
|
-
"start-dev": "webpack --config webpack.config.dev.
|
|
38
|
+
"start": "export NODE_OPTIONS=--openssl-legacy-provider && webpack --config webpack.config.dev.cjs",
|
|
39
|
+
"start-dev": "webpack --config webpack.config.dev.cjs",
|
|
40
40
|
"server": "webpack serve -c webpack.config.dev.js --static ./",
|
|
41
41
|
"doc": "./node_modules/.bin/jsdoc src/ src/dataset src/legend src/style -d docs/jsdoc",
|
|
42
|
-
"build": "webpack --config webpack.config.prod.
|
|
42
|
+
"build": "webpack --config webpack.config.prod.cjs",
|
|
43
43
|
"test": "jest"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
@@ -71,5 +71,8 @@
|
|
|
71
71
|
"webpack-cli": "^5.0.0",
|
|
72
72
|
"webpack-dev-server": "^4.11.1",
|
|
73
73
|
"webpack-livereload-plugin": "^3.0.2"
|
|
74
|
+
},
|
|
75
|
+
"engines": {
|
|
76
|
+
"node": ">=14"
|
|
74
77
|
}
|
|
75
78
|
}
|
package/src/App.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { CSVGrid } from './dataset/CSVGrid'
|
|
4
|
+
// internal imports
|
|
5
|
+
import { GeoCanvas } from './GeoCanvas.js'
|
|
6
|
+
import { Layer } from './Layer.js'
|
|
7
|
+
import { Dataset } from './Dataset.js'
|
|
8
|
+
import { Tooltip } from './Tooltip.js'
|
|
9
|
+
import { CSVGrid } from './dataset/CSVGrid.js'
|
|
10
10
|
//import { ParquetGrid } from './dataset/ParquetGrid';
|
|
11
|
-
import { TiledGrid } from './dataset/TiledGrid'
|
|
12
|
-
import { BackgroundLayer } from './BackgroundLayer'
|
|
13
|
-
import { BackgroundLayerWMS } from './BackgroundLayerWMS'
|
|
14
|
-
import { LabelLayer } from './LabelLayer'
|
|
15
|
-
import { LineLayer } from './LineLayer'
|
|
16
|
-
|
|
11
|
+
import { TiledGrid } from './dataset/TiledGrid.js'
|
|
12
|
+
import { BackgroundLayer } from './BackgroundLayer.js'
|
|
13
|
+
import { BackgroundLayerWMS } from './BackgroundLayerWMS.js'
|
|
14
|
+
import { LabelLayer } from './LabelLayer.js'
|
|
15
|
+
import { LineLayer } from './LineLayer.js'
|
|
16
|
+
import { monitor, monitorDuration } from './utils/Utils.js'
|
|
17
|
+
|
|
18
|
+
// external imports
|
|
17
19
|
import { select } from 'd3-selection'
|
|
18
|
-
import { monitor, monitorDuration } from './utils/Utils'
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* A gridviz application.
|
|
@@ -159,6 +160,9 @@ export class App {
|
|
|
159
160
|
|
|
160
161
|
if (monitor) monitorDuration('End redraw')
|
|
161
162
|
|
|
163
|
+
// listen for resize events on the App's container and handle them
|
|
164
|
+
this.defineResizeObserver(container, canvas)
|
|
165
|
+
|
|
162
166
|
return this
|
|
163
167
|
}
|
|
164
168
|
|
|
@@ -250,7 +254,9 @@ export class App {
|
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
//draw image saved + draw rectangle
|
|
253
|
-
const rectWPix = this.selectionRectangleWidthPix
|
|
257
|
+
const rectWPix = this.selectionRectangleWidthPix
|
|
258
|
+
? this.selectionRectangleWidthPix(focus.resolution, this.getZoomFactor())
|
|
259
|
+
: 4
|
|
254
260
|
this.cg.initCanvasTransform()
|
|
255
261
|
this.cg.ctx.strokeStyle = this.selectionRectangleColor
|
|
256
262
|
this.cg.ctx.lineWidth = rectWPix
|
|
@@ -648,4 +654,28 @@ export class App {
|
|
|
648
654
|
this.cg.setViewFromURL()
|
|
649
655
|
return this
|
|
650
656
|
}
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* @description Add a resize event observer to the Apps container and update the canvas accordingly
|
|
660
|
+
* @param {HTMLDivElement} container The App's container element
|
|
661
|
+
* @param {HTMLCanvasElement} canvas The App canvas element
|
|
662
|
+
* @memberof App
|
|
663
|
+
*/
|
|
664
|
+
defineResizeObserver(container, canvas) {
|
|
665
|
+
// listen to resize events
|
|
666
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
667
|
+
// update the app and canvas size
|
|
668
|
+
if (this.h !== container.clientHeight || this.w !== container.clientWidth) {
|
|
669
|
+
this.h = container.clientHeight
|
|
670
|
+
this.w = container.clientWidth
|
|
671
|
+
this.cg.h = container.clientHeight
|
|
672
|
+
this.cg.w = container.clientWidth
|
|
673
|
+
canvas.setAttribute('width', '' + this.w)
|
|
674
|
+
canvas.setAttribute('height', '' + this.h)
|
|
675
|
+
this.redraw()
|
|
676
|
+
}
|
|
677
|
+
})
|
|
678
|
+
|
|
679
|
+
resizeObserver.observe(container)
|
|
680
|
+
}
|
|
651
681
|
}
|
package/src/dataset/COGeo.js
CHANGED
package/src/dataset/CSVGrid.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/** @typedef {{ dims: object, crs: string, tileSizeCell: number, originPoint: {x:number,y:number}, resolutionGeo: number, tilingBounds:import("../Dataset").Envelope }} GridInfo */
|
|
5
5
|
|
|
6
6
|
import { csv } from 'd3-fetch'
|
|
7
|
-
import { DatasetComponent } from '../DatasetComponent'
|
|
7
|
+
import { DatasetComponent } from '../DatasetComponent.js'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* A dataset composed of a single CSV file (not tiled).
|
|
@@ -43,7 +43,6 @@ export class CSVGrid extends DatasetComponent {
|
|
|
43
43
|
|
|
44
44
|
//load data
|
|
45
45
|
this.infoLoadingStatus = 'loading'
|
|
46
|
-
|
|
47
46
|
;(async () => {
|
|
48
47
|
try {
|
|
49
48
|
const data = await csv(this.url)
|
package/src/dataset/GeoTIFF.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
import { DatasetComponent } from '../DatasetComponent'
|
|
4
|
+
import { DatasetComponent } from '../DatasetComponent.js'
|
|
5
5
|
import { tableFromIPC } from 'apache-arrow'
|
|
6
6
|
//import { readParquet } from "parquet-wasm"
|
|
7
7
|
|
|
@@ -49,7 +49,6 @@ export class ParquetGrid extends DatasetComponent {
|
|
|
49
49
|
|
|
50
50
|
//load data
|
|
51
51
|
this.infoLoadingStatus = 'loading'
|
|
52
|
-
|
|
53
52
|
;(async () => {
|
|
54
53
|
try {
|
|
55
54
|
const resp = await fetch(this.url)
|
package/src/dataset/TiledGrid.js
CHANGED
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
/** @typedef {{ dims: object, crs: string, tileSizeCell: number, originPoint: {x:number,y:number}, resolutionGeo: number, tilingBounds:import("../Dataset").Envelope, format:import("../DatasetComponent").Format }} GridInfo */
|
|
5
5
|
|
|
6
|
+
// internal
|
|
7
|
+
import { GridTile } from './GridTile.js'
|
|
8
|
+
import { App } from '../App.js'
|
|
9
|
+
import { DatasetComponent } from '../DatasetComponent.js'
|
|
10
|
+
import { monitor, monitorDuration } from '../utils/Utils.js'
|
|
11
|
+
|
|
12
|
+
// external
|
|
6
13
|
import { json, csv } from 'd3-fetch'
|
|
7
|
-
import { GridTile } from './GridTile'
|
|
8
|
-
import { App } from '../App'
|
|
9
|
-
import { DatasetComponent } from '../DatasetComponent'
|
|
10
|
-
import { monitor, monitorDuration } from '../utils/Utils'
|
|
11
14
|
import { tableFromIPC } from 'apache-arrow'
|
|
12
15
|
|
|
13
16
|
/**
|
|
@@ -142,7 +145,6 @@ export class TiledGrid extends DatasetComponent {
|
|
|
142
145
|
|
|
143
146
|
//mark tile as loading
|
|
144
147
|
this.cache[xT][yT] = 'loading'
|
|
145
|
-
|
|
146
148
|
;(async () => {
|
|
147
149
|
//request tile
|
|
148
150
|
/** @type {Array.<import("../Dataset").Cell>} */
|
package/src/index.js
CHANGED
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
//the application
|
|
5
|
-
export { App } from './App'
|
|
6
|
-
export { GeoCanvas } from './GeoCanvas'
|
|
7
|
-
export { Style } from './Style'
|
|
8
|
-
export { Layer } from './Layer'
|
|
9
|
-
export { Dataset } from './Dataset'
|
|
10
|
-
export { DatasetComponent } from './DatasetComponent'
|
|
11
|
-
|
|
12
|
-
//export dataset types
|
|
13
|
-
export { TiledGrid } from './dataset/TiledGrid'
|
|
14
|
-
export { CSVGrid } from './dataset/CSVGrid'
|
|
4
|
+
// the application
|
|
5
|
+
export { App } from './App.js'
|
|
6
|
+
export { GeoCanvas } from './GeoCanvas.js'
|
|
7
|
+
export { Style } from './Style.js'
|
|
8
|
+
export { Layer } from './Layer.js'
|
|
9
|
+
export { Dataset } from './Dataset.js'
|
|
10
|
+
export { DatasetComponent } from './DatasetComponent.js'
|
|
11
|
+
|
|
12
|
+
// export dataset types
|
|
13
|
+
export { TiledGrid } from './dataset/TiledGrid.js'
|
|
14
|
+
export { CSVGrid } from './dataset/CSVGrid.js'
|
|
15
15
|
//export { ParquetGrid } from "./dataset/ParquetGrid"
|
|
16
16
|
//export { GeoTIFF } from "./dataset/GeoTIFF"
|
|
17
17
|
|
|
18
|
-
//export styles
|
|
19
|
-
export { ShapeColorSizeStyle } from './style/ShapeColorSizeStyle'
|
|
20
|
-
export { StrokeStyle } from './style/StrokeStyle'
|
|
21
|
-
export { JoyPlotStyle } from './style/JoyPlotStyle'
|
|
22
|
-
export { CompositionStyle } from './style/CompositionStyle'
|
|
23
|
-
export { SegmentStyle } from './style/SegmentStyle'
|
|
24
|
-
export { TextStyle } from './style/TextStyle'
|
|
25
|
-
export { KernelSmoothingStyle } from './style/KernelSmoothingStyle'
|
|
18
|
+
// export styles
|
|
19
|
+
export { ShapeColorSizeStyle } from './style/ShapeColorSizeStyle.js'
|
|
20
|
+
export { StrokeStyle } from './style/StrokeStyle.js'
|
|
21
|
+
export { JoyPlotStyle } from './style/JoyPlotStyle.js'
|
|
22
|
+
export { CompositionStyle } from './style/CompositionStyle.js'
|
|
23
|
+
export { SegmentStyle } from './style/SegmentStyle.js'
|
|
24
|
+
export { TextStyle } from './style/TextStyle.js'
|
|
25
|
+
export { KernelSmoothingStyle } from './style/KernelSmoothingStyle.js'
|
|
26
26
|
//export { KernelSmoothingOldStyle } from "./style/KernelSmoothingStyle"
|
|
27
27
|
//export { KernelSmoothingWGLStyle } from "./style/KernelSmoothingStyle"
|
|
28
|
-
export { PillarStyle } from './style/PillarStyle'
|
|
29
|
-
export { SideStyle } from './style/SideStyle'
|
|
30
|
-
export { ContourStyle } from './style/ContourStyle'
|
|
31
|
-
export { SideCatStyle } from './style/SideCatStyle'
|
|
32
|
-
export { DotDensityStyle } from './style/DotDensityStyle'
|
|
33
|
-
export { TanakaStyle } from './style/TanakaStyle'
|
|
34
|
-
export { LegoStyle } from './style/LegoStyle'
|
|
35
|
-
export { SquareColorWGLStyle } from './style/SquareColorWGLStyle'
|
|
36
|
-
export { SquareColorCatWGLStyle } from './style/SquareColorCatWGLStyle'
|
|
37
|
-
export { MosaicStyle } from './style/MosaicStyle'
|
|
38
|
-
export { NinjaStarStyle } from './style/NinjaStarStyle'
|
|
39
|
-
|
|
40
|
-
//export additional layers
|
|
41
|
-
export { BackgroundLayer } from './BackgroundLayer'
|
|
42
|
-
export { BackgroundLayerWMS } from './BackgroundLayerWMS'
|
|
43
|
-
export { LabelLayer } from './LabelLayer'
|
|
44
|
-
export { LineLayer as BoundaryLayer } from './LineLayer'
|
|
45
|
-
|
|
46
|
-
export
|
|
47
|
-
export {
|
|
48
|
-
export {
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
51
|
-
export {
|
|
52
|
-
|
|
53
|
-
|
|
28
|
+
export { PillarStyle } from './style/PillarStyle.js'
|
|
29
|
+
export { SideStyle } from './style/SideStyle.js'
|
|
30
|
+
export { ContourStyle } from './style/ContourStyle.js'
|
|
31
|
+
export { SideCatStyle } from './style/SideCatStyle.js'
|
|
32
|
+
export { DotDensityStyle } from './style/DotDensityStyle.js'
|
|
33
|
+
export { TanakaStyle } from './style/TanakaStyle.js'
|
|
34
|
+
export { LegoStyle } from './style/LegoStyle.js'
|
|
35
|
+
export { SquareColorWGLStyle } from './style/SquareColorWGLStyle.js'
|
|
36
|
+
export { SquareColorCatWGLStyle } from './style/SquareColorCatWGLStyle.js'
|
|
37
|
+
export { MosaicStyle } from './style/MosaicStyle.js'
|
|
38
|
+
export { NinjaStarStyle } from './style/NinjaStarStyle.js'
|
|
39
|
+
|
|
40
|
+
// export additional layers
|
|
41
|
+
export { BackgroundLayer } from './BackgroundLayer.js'
|
|
42
|
+
export { BackgroundLayerWMS } from './BackgroundLayerWMS.js'
|
|
43
|
+
export { LabelLayer } from './LabelLayer.js'
|
|
44
|
+
export { LineLayer as BoundaryLayer } from './LineLayer.js'
|
|
45
|
+
|
|
46
|
+
// export legends
|
|
47
|
+
export { ColorLegend } from './legend/ColorLegend.js'
|
|
48
|
+
export { ColorDiscreteLegend } from './legend/ColorDiscreteLegend.js'
|
|
49
|
+
export { ColorCategoryLegend } from './legend/ColorCategoryLegend.js'
|
|
50
|
+
export { SizeLegend } from './legend/SizeLegend.js'
|
|
51
|
+
export { SegmentWidthLegend } from './legend/SegmentWidthLegend.js'
|
|
52
|
+
export { SegmentOrientationLegend } from './legend/SegmentOrientationLegend.js'
|
|
53
|
+
|
|
54
|
+
// export { goToStraight, zoomTo } from "./utils/zoomUtils"
|
|
54
55
|
export * from './utils/stretching.js'
|
|
55
56
|
|
|
56
|
-
export { getClass } from './utils/Utils'
|
|
57
|
+
export { getClass } from './utils/Utils.js'
|
|
57
58
|
|
|
59
|
+
import { GeoCanvas } from './GeoCanvas.js'
|
|
58
60
|
import { geoAzimuthalEqualArea } from 'd3-geo'
|
|
59
|
-
import { GeoCanvas } from './GeoCanvas'
|
|
60
61
|
|
|
61
62
|
/**
|
|
62
63
|
* Returns label layer from Eurostat, for ETRS89-LAEA grids.
|
|
@@ -149,10 +150,10 @@ export const getEurostatBoundariesLayer = function (opts) {
|
|
|
149
150
|
return p.lvl == 3
|
|
150
151
|
? [2 * zf, 2 * zf]
|
|
151
152
|
: p.lvl == 2
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
? [5 * zf, 2 * zf]
|
|
154
|
+
: p.lvl == 1
|
|
155
|
+
? [5 * zf, 2 * zf]
|
|
156
|
+
: [10 * zf, 3 * zf]
|
|
156
157
|
else if (zf < 1000)
|
|
157
158
|
return p.lvl == 2 ? [5 * zf, 2 * zf] : p.lvl == 1 ? [5 * zf, 2 * zf] : [10 * zf, 3 * zf]
|
|
158
159
|
else if (zf < 2000) return p.lvl == 1 ? [5 * zf, 2 * zf] : [10 * zf, 3 * zf]
|
package/src/legend/SizeLegend.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
import { Style } from '../Style'
|
|
4
|
+
import { Style } from '../Style.js'
|
|
5
5
|
|
|
6
6
|
/** @typedef {"flag"|"piechart"|"ring"|"segment"|"radar"|"agepyramid"|"halftone"} CompositionType */
|
|
7
7
|
|
|
@@ -104,7 +104,7 @@ export class CompositionStyle extends Style {
|
|
|
104
104
|
const yc = cell.y + offset.dy + (type_ === 'agepyramid' ? 0 : r * 0.5)
|
|
105
105
|
|
|
106
106
|
//compute offset angle, when relevant
|
|
107
|
-
const offAng =
|
|
107
|
+
const offAng = this.offsetAngle ? (this.offsetAngle(cell, r, zf) * Math.PI) / 180 : 0
|
|
108
108
|
|
|
109
109
|
if (type_ === 'agepyramid' || type_ === 'radar' || type_ === 'halftone') {
|
|
110
110
|
//get cell category max value
|
|
@@ -118,8 +118,7 @@ export class CompositionStyle extends Style {
|
|
|
118
118
|
let cumul = 0
|
|
119
119
|
if (type_ === 'agepyramid' && this.agePyramidHeight)
|
|
120
120
|
cumul = (r - this.agePyramidHeight(cell, r, zf)) / 2
|
|
121
|
-
if (type_ === 'radar' || type_ === 'halftone')
|
|
122
|
-
cumul = Math.PI / 2 + offAng
|
|
121
|
+
if (type_ === 'radar' || type_ === 'halftone') cumul = Math.PI / 2 + offAng
|
|
123
122
|
|
|
124
123
|
//compute the increment, which is the value to increment the cumul for each category
|
|
125
124
|
const incr =
|
|
@@ -249,9 +248,16 @@ export class CompositionStyle extends Style {
|
|
|
249
248
|
//draw
|
|
250
249
|
cg.ctx.beginPath()
|
|
251
250
|
cg.ctx.moveTo(xc, yc)
|
|
252
|
-
cg.ctx.arc(xc, yc, sG * 0.5, a1+offAng, a2+offAng)
|
|
251
|
+
cg.ctx.arc(xc, yc, sG * 0.5, a1 + offAng, a2 + offAng)
|
|
253
252
|
if (this.pieChartInternalRadiusFactor)
|
|
254
|
-
cg.ctx.arc(
|
|
253
|
+
cg.ctx.arc(
|
|
254
|
+
xc,
|
|
255
|
+
yc,
|
|
256
|
+
sG * 0.5 * this.pieChartInternalRadiusFactor,
|
|
257
|
+
a1 + offAng,
|
|
258
|
+
a2 + offAng,
|
|
259
|
+
true
|
|
260
|
+
)
|
|
255
261
|
cg.ctx.closePath()
|
|
256
262
|
cg.ctx.fill()
|
|
257
263
|
} else if (type_ === 'ring') {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
import { Style } from '../Style'
|
|
4
|
+
import { Style } from '../Style.js'
|
|
5
5
|
import { randomNormal } from 'd3-random'
|
|
6
|
-
import { checkWebGLSupport, makeWebGLCanvas } from '../utils/webGLUtils'
|
|
7
|
-
import { WebGLSquareColoring } from '../utils/WebGLSquareColoring'
|
|
6
|
+
import { checkWebGLSupport, makeWebGLCanvas } from '../utils/webGLUtils.js'
|
|
7
|
+
import { WebGLSquareColoring } from '../utils/WebGLSquareColoring.js'
|
|
8
8
|
import { color } from 'd3-color'
|
|
9
|
-
import { monitor, monitorDuration } from '../utils/Utils'
|
|
9
|
+
import { monitor, monitorDuration } from '../utils/Utils.js'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
*
|
package/src/style/LegoStyle.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
import { TanakaStyle } from './TanakaStyle'
|
|
5
|
-
import { StrokeStyle } from './StrokeStyle'
|
|
6
|
-
import { SquareColorCatWGLStyle } from './SquareColorCatWGLStyle'
|
|
7
|
-
import { Style } from '../Style'
|
|
4
|
+
import { TanakaStyle } from './TanakaStyle.js'
|
|
5
|
+
import { StrokeStyle } from './StrokeStyle.js'
|
|
6
|
+
import { SquareColorCatWGLStyle } from './SquareColorCatWGLStyle.js'
|
|
7
|
+
import { Style } from '../Style.js'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @author Julien Gaffuri
|
package/src/style/MosaicStyle.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
import { Style } from '../Style'
|
|
4
|
+
import { Style } from '../Style.js'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
@@ -33,7 +33,7 @@ export class NinjaStarStyle extends Style {
|
|
|
33
33
|
|
|
34
34
|
/** A function returning the shape.
|
|
35
35
|
* @type {function(import("../Dataset").Cell):string} */
|
|
36
|
-
this.shape = opts.shape || (() =>
|
|
36
|
+
this.shape = opts.shape || (() => 'o')
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
package/src/style/PillarStyle.js
CHANGED
package/src/style/SideStyle.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
import { Style } from '../Style'
|
|
5
|
-
import { makeWebGLCanvas } from '../utils/webGLUtils'
|
|
6
|
-
import { WebGLSquareColoringCatAdvanced } from '../utils/WebGLSquareColoringCatAdvanced'
|
|
7
|
-
import { monitor, monitorDuration } from '../utils/Utils'
|
|
4
|
+
import { Style } from '../Style.js'
|
|
5
|
+
import { makeWebGLCanvas } from '../utils/webGLUtils.js'
|
|
6
|
+
import { WebGLSquareColoringCatAdvanced } from '../utils/WebGLSquareColoringCatAdvanced.js'
|
|
7
|
+
import { monitor, monitorDuration } from '../utils/Utils.js'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Style based on webGL
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//@ts-check
|
|
2
2
|
'use strict'
|
|
3
3
|
|
|
4
|
-
import { Style } from '../Style'
|
|
5
|
-
import { makeWebGLCanvas } from '../utils/webGLUtils'
|
|
6
|
-
import { WebGLSquareColoringAdvanced } from '../utils/WebGLSquareColoringAdvanced'
|
|
7
|
-
import { monitor, monitorDuration } from '../utils/Utils'
|
|
4
|
+
import { Style } from '../Style.js'
|
|
5
|
+
import { makeWebGLCanvas } from '../utils/webGLUtils.js'
|
|
6
|
+
import { WebGLSquareColoringAdvanced } from '../utils/WebGLSquareColoringAdvanced.js'
|
|
7
|
+
import { monitor, monitorDuration } from '../utils/Utils.js'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Style based on webGL
|