Skip to content

Commit

Permalink
Merge branch 'main' into cog-imagery-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
staffordsmith83 committed Dec 15, 2023
2 parents 0c3faaf + f6739a7 commit 9011eba
Show file tree
Hide file tree
Showing 56 changed files with 1,917 additions and 439 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"useBuiltIns": "usage"
}
],
"@babel/preset-react",
["@babel/preset-react", { "runtime": "automatic" }],
["@babel/typescript", { "allowNamespaces": true }]
],
"plugins": [
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Update .prettierignore whenever this file changes
docs/
node_modules/
.idea/
Expand All @@ -17,6 +18,7 @@ package-lock.json
*.swp
dist
.history/
ts-out/

# Catalog index generation files
catalog-index*.json
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package-lock.json
*.swp
dist
.history/
ts-out/

# Catalog index generation files
catalog-index*.json
Expand Down
29 changes: 28 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
# Change Log

#### next release (8.3.10)
#### next release (8.5.0)

- **Breaking changes:**
- Upgrade TypeScript to 5.2
- Switch Babel configuration to new JSX transform
- Improve tsconfig files
- Update `thredds-catalog-crawler` to `0.0.6`
- [The next improvement]

#### 8.4.1 - 2023-12-08

- Temporary UX fixes for clipping box:
- An option to zoom to clipping box
- An option to re-position the clipping box
- Trigger repositioning of clipping box when the user enables clipping box for the first time
- Cursor and scale point handle changes (makes it much easier to grasp)
- More robust interaction with the box
- Fix a bug where `DragPoints` was interfering with pedstrian mode mouse movements.
- Update `webpack` to `4.47.0` to support Node >= 18 without extra command line parameters.
- Add support for multiple `urls` for `GeoJsonCatalogItem`.
- Automatically explode GeoJSON `MultiPoint` features to `Point` features.
- Add new table styling traits - `scaleByDistance` and `disableDepthTestDistance`.
- Add support for `LineString` and `MultiLineString` when using `GeoJsonCatalogItem` in `CZML` mode.

#### 8.4.0 - 2023-12-01

- **Breaking change:** Replaced `node-sass` with (dart) `sass`
- You will need to update your `TerriaMap` to use `sass` instead of `node-sass`.
- Added `apiColumns` to `ApiTableCatalogItem` - this can now be used to specify `responseDataPath` per table column.
- `ArcGisMapServerCatalogItem` will now use "pre-cached tiles" if available if no (or all) `layers` are specified.

#### 8.3.9 - 2023-11-24

- **Breaking change:** new Search Provider model
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ reports via email addressed to at least 2 of the following community leaders:

- Ana Belgun: ana.belgun@data61.csiro.au
- Stephen Davies: stephen.davies@data61.csiro.au
- Mats Henrikson: mats.henrikson@data61.csiro.au
- Nick Forbes-Smith: nick.forbes-smith@data61.csiro.au
- Peter Hassall: peter.hassall@data61.csiro.au

All complaints will be reviewed and investigated promptly and fairly.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Sites we're aware of that are using TerriaJS. These are not endorsements or test

### Technical

- NodeJS v14 or v16 are supported
- NodeJS v16, v18 and v20 are supported
- Built in TypeScript & ES2020+ JavaScript, compiled with Babel to ES5.
- Supports modern browsers (recent versions of Microsoft Edge, Mozilla Firefox & Google Chrome).
- [TerriaJS Server component](https://github.com/TerriajS/TerriaJS-Server) runs in NodeJS and provides proxying for web services that don't support CORS or require authentication. Instead of using TerriaJS-Sever proxy service, an alternative proxying service URL can be specified. See [Specify an alternative proxy server URL](/doc/connecting-to-data/cross-origin-resource-sharing.md)
Expand Down
2 changes: 1 addition & 1 deletion buildprocess/configureWebpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function configureWebpack(
useBuiltIns: "usage"
}
],
"@babel/preset-react",
["@babel/preset-react", { runtime: "automatic" }],
["@babel/typescript", { allowNamespaces: true }]
],
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ The template will replace all occurrences of `{{property}}` with the value of th

The result is:

<img src="./img/template.png">
<img src="../img/template.png">

instead of:

<img src="./img/no_template.png">
<img src="../img/no_template.png">

You can provide a template to use for the name of the collapsible section (eg. to replace `RGB` in the example above), like so:

Expand Down Expand Up @@ -150,7 +150,7 @@ If `{{Pixel Value}}` equals to `150` and `{{feature.data.layerId}}` to `2`, the

For features with time-varying table-based data structures (eg. CSV, SOS2, SDMX-JSON, if there is a time column), the feature info panel also includes a chart of the data over time, eg.

<img src="./img/feature_info_with_time_series.png">
<img src="../img/feature_info_with_time_series.png">

You can place this chart in your template using `{{terria.timeSeries.chart}}`. Alternatively, you can access the following component information:

Expand Down
21 changes: 6 additions & 15 deletions doc/contributing/problems-and-solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,14 @@ nvm install 16
nvm use 16
```

---

### Problem

Python errors when building NodeJS dependencies (eg `node-sass`). This is common on M1/M2 macs.

### Solution

You may need to install Python2 to build NodeJS dependencies (like `node-sass`)

We recommend using [`pyenv`](https://github.com/pyenv/pyenv#installation) to install Python2.
When building TerriaMap/TerriaJS I see the following error

Follow installation instructions [here](https://github.com/pyenv/pyenv#installation).
```
Error: error:0308010C:digital envelope routines::unsupported
```

Then run the following to install Python 2.7.18 and use it:
### Solution

```bash
pyenv install 2.7.18
pyenv shell 2.7.18
```
Update to TerriaJS 8.4.1.
23 changes: 0 additions & 23 deletions lib/Core/arraysAreEqual.js

This file was deleted.

19 changes: 19 additions & 0 deletions lib/Core/arraysAreEqual.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import isDefined from "./isDefined";

export default function arraysAreEqual<T>(left: T[], right: T[]) {
if (left === right) {
return true;
}

if (!isDefined(left) || !isDefined(right) || left.length !== right.length) {
return false;
}

for (var i = 0; i < left.length; ++i) {
if (left[i] !== right[i]) {
return false;
}
}

return true;
}
17 changes: 17 additions & 0 deletions lib/Core/setsAreEqual.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export function setsAreEqual<T>(left: Set<T> | T[], right: Set<T> | T[]) {
if (Array.isArray(left)) left = new Set(left);

if (Array.isArray(right)) right = new Set(right);

if (left === right) {
return true;
}

if (left.size !== right.size) {
return false;
}

const union = new Set([...left, ...right]);

return union.size === left.size && union.size === right.size;
}
7 changes: 7 additions & 0 deletions lib/Map/DragPoints/DragPoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ DragPoints.prototype.setUp = function () {
}
};

/**
* Destroy drag points helper. The instance becomes unusable after calling destroy.
*/
DragPoints.prototype.destroy = function () {
this._dragPointsHelper.destroy();
};

/**
* The drag count is an indication of how long the user dragged for. If it's really small, perhaps the user clicked,
* but a mousedown/mousemove/mouseup event trio was triggered anyway. It solves a problem where in leaflet the click
Expand Down
Loading

0 comments on commit 9011eba

Please sign in to comment.