Skip to content

Commit

Permalink
Merge pull request #170 from ndsev/release/2024.5.0
Browse files Browse the repository at this point in the history
Release 2024.5.0
  • Loading branch information
Waguramu authored Dec 18, 2024
2 parents 471f78c + 2929d2a commit 75574a8
Show file tree
Hide file tree
Showing 32 changed files with 833 additions and 380 deletions.
22 changes: 14 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,30 @@ include(FetchContent)
set(CMAKE_CXX_STANDARD 20)

# Treat warnings as errors, with some exceptions for Cesium.
set (ERDBLICK_CXX_FLAGS
set(ERDBLICK_CXX_FLAGS
"-Wall -Wno-error=sign-conversion -Wno-sign-compare -Wno-sign-conversion -Wno-unused-local-typedefs -Wno-comment -Wno-effc++")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ERDBLICK_CXX_FLAGS} -Wno-bool-compare")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ERDBLICK_CXX_FLAGS} -Wno-error=shorten-64-to-32")
endif()

# External dependencies.
# Adjust CXX_FLAGS for Debug builds
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif()

# External dependencies
message("Building for ${CMAKE_SYSTEM_NAME}.")

FetchContent_Declare(mapget
GIT_REPOSITORY "https://github.com/Klebert-Engineering/mapget"
GIT_TAG "v2024.4.1"
GIT_SHALLOW ON)
FetchContent_MakeAvailable(mapget)

if (NOT TARGET mapget)
FetchContent_Declare(mapget
GIT_REPOSITORY "https://github.com/Klebert-Engineering/mapget"
GIT_TAG "v2024.5.0"
GIT_SHALLOW ON)
FetchContent_MakeAvailable(mapget)
endif()

FetchContent_Declare(yaml-cpp
GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
Expand All @@ -44,4 +51,3 @@ else()
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
DEPENDS erdblick-core)
endif()

20 changes: 20 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "debug-wasm",
"inherits": "common",
"displayName": "Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_FLAGS_DEBUG": "-g"
},
"environment": {
"EMCC_DEBUG": "1"
}
},
{
"name": "release",
"inherits": "common",
Expand All @@ -37,6 +49,14 @@
"NG_DEVELOP": "TRUE"
}
},
{
"name": "debug-wasm",
"configurePreset": "debug-wasm",
"displayName": "Debug",
"environment": {
"NG_DEVELOP": "TRUE"
}
},
{
"name": "release",
"configurePreset": "release",
Expand Down
116 changes: 62 additions & 54 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.4.1
2024.5.0
40 changes: 32 additions & 8 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"assets": [
{
"glob": "**/*",
"input": "node_modules/cesium/Build/Cesium",
"input": "node_modules/cesium/Build/CesiumUnminified",
"output": "/bundle/cesium"
},
{
Expand Down Expand Up @@ -58,9 +58,7 @@
"node_modules/material-icons/iconfont/material-icons.css",
"erdblick_app/styles.scss"
],
"scripts": [

],
"scripts": [],
"customWebpackConfig": {
"path": "./webpack.config.js"
},
Expand All @@ -80,7 +78,34 @@
"maximumError": "4kb"
}
],
"outputHashing": "all"
"outputHashing": "all",
"assets": [
{
"glob": "**/*",
"input": "node_modules/cesium/Build/Cesium",
"output": "/bundle/cesium"
},
{
"glob": "**/*",
"input": "config/styles",
"output": "/bundle/styles"
},
{
"glob": "**/*",
"input": "images",
"output": "/bundle/images"
},
{
"glob": "**/*.json",
"input": "config",
"output": "/"
},
{
"glob": "VERSION",
"input": ".",
"output": "/bundle/"
}
]
},
"development": {
"buildOptimizer": false,
Expand Down Expand Up @@ -123,8 +148,7 @@
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"assets": [
],
"assets": [],
"styles": [
"erdblick_app/styles.scss"
],
Expand All @@ -136,6 +160,6 @@
}
},
"cli": {
"analytics": false
"analytics": false
}
}
24 changes: 12 additions & 12 deletions config/styles/default-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,36 @@ rules:

# Hover/Selection styles
- geometry: ["mesh", "polygon"]
color: orange
opacity: 1.0
color: green
opacity: 0.8
mode: hover
offset: [0, 0, -0.3]
- geometry: ["line"]
color: orange
opacity: 1.0
color: green
opacity: 0.8
width: 10.0
mode: hover
offset: [0, 0, -0.1]
- geometry: ["point"]
color: orange
opacity: 1.0
color: green
opacity: 0.8
width: 20.0
mode: hover
offset: [0, 0, 0.1]
- geometry: ["mesh", "polygon"]
color: red
opacity: 1.0
color: yellow
opacity: 0.8
mode: selection
offset: [0, 0, -0.3]
- geometry: ["line"]
color: red
opacity: 1.0
color: yellow
opacity: 0.8
width: 10.0
mode: selection
offset: [0, 0, -0.1]
- geometry: ["point"]
color: red
opacity: 1.0
color: yellow
opacity: 0.8
width: 20.0
mode: selection
offset: [0, 0, 0.1]
11 changes: 11 additions & 0 deletions erdblick_app/app/debugapi.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,15 @@ export class ErdblickDebugApi {
coreLib(): ErdblickCore_ {
return coreLib;
}

/** Run some simfil query to reproduce problems with search. */
runSimfilQuery(query: string = "**.transition") {
for (const [_, tile] of this.mapService.loadedTileLayers) {
tile.peek(parsedTile => {
let search = new coreLib.FeatureLayerSearch(parsedTile);
const matchingFeatures = search.filter(query);
search.delete();
})
}
}
}
2 changes: 2 additions & 0 deletions erdblick_app/app/editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const completionsList = [
{label: "name", type: "property"},
{label: "rules", type: "property"},
{label: "geometry", type: "property"},
{label: "geometry-name", type: "property"},
{label: "aspect", type: "property"},
{label: "mode", type: "property"},
{label: "type", type: "property"},
Expand Down Expand Up @@ -60,6 +61,7 @@ const completionsList = [
{label: "offset-scale-by-distance", type: "property"},
{label: "first-of", type: "property"},
{label: "attribute-type", type: "property"},
{label: "attribute-filter", type: "property"},
{label: "attribute-layer-type", type: "property"},
{label: "point-merge-grid-cell", type: "property"},
{label: "FILL", type: "keyword"},
Expand Down
27 changes: 26 additions & 1 deletion erdblick_app/app/feature.panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ interface Column {
<p-treeTableToggler [rowNode]="rowNode" (click)="$event.stopPropagation()">
</p-treeTableToggler>
<span (click)="onKeyClick($event, rowData)"
style="cursor: pointer">{{ rowData['key'] }}
(mouseover)="onKeyHover($event, rowData)"
(mouseout)="onKeyHoverExit($event, rowData)"
style="cursor: pointer">
{{ rowData['key'] }}
</span>
<p-buttonGroup *ngIf="rowData['sourceDataReferences']"
class="source-data-ref-container">
Expand Down Expand Up @@ -402,6 +405,11 @@ export class FeaturePanelComponent implements OnInit, AfterViewInit, OnDestroy
rowData["mapId"],
rowData["value"],
coreLib.HighlightMode.HOVER_HIGHLIGHT).then();
} else if (rowData["hoverId"]) {
this.mapService.highlightFeatures([{
mapTileKey: this.inspectionService.selectedFeatures[rowData["featureIndex"]].featureTile.mapTileKey,
featureId: rowData["hoverId"]
}], false, coreLib.HighlightMode.HOVER_HIGHLIGHT).then();
}
}

Expand All @@ -412,6 +420,23 @@ export class FeaturePanelComponent implements OnInit, AfterViewInit, OnDestroy
}
}

onKeyHover(event: any, rowData: any) {
event.stopPropagation();
if (rowData["hoverId"]) {
this.mapService.highlightFeatures([{
mapTileKey: this.inspectionService.selectedFeatures[rowData["featureIndex"]].featureTile.mapTileKey,
featureId: rowData["hoverId"]
}], false, coreLib.HighlightMode.HOVER_HIGHLIGHT).then();
}
}

onKeyHoverExit(event: any, rowData: any) {
event.stopPropagation();
if (rowData["type"] == this.InspectionValueType.FEATUREID.value) {
this.mapService.highlightFeatures([], false, coreLib.HighlightMode.HOVER_HIGHLIGHT).then();
}
}

getStyleClassByType(valueType: number): string {
switch (valueType) {
case this.InspectionValueType.SECTION.value:
Expand Down
4 changes: 4 additions & 0 deletions erdblick_app/app/features.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ export class FeatureTile {
}

has(featureId: string) {
const index = featureId.indexOf(':attribute');
if (index > -1) {
featureId = featureId.slice(0, index);
}
return this.peek((tileFeatureLayer: TileFeatureLayer) => {
let feature = tileFeatureLayer.find(featureId);
let result = !feature.isNull();
Expand Down
11 changes: 7 additions & 4 deletions erdblick_app/app/inspection.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class InspectionService {
}

getFeatureTreeDataFromModel() {
let convertToTreeTableNodes = (dataNodes: Array<InspectionModelData>): TreeTableNode[] => {
let convertToTreeTableNodes = (dataNodes: Array<InspectionModelData>, featureIndex: number): TreeTableNode[] => {
let treeNodes: Array<TreeTableNode> = [];
for (const data of dataNodes) {
const node: TreeTableNode = {};
Expand Down Expand Up @@ -164,6 +164,8 @@ export class InspectionService {
}
if (data.hasOwnProperty("hoverId")) {
node.data["hoverId"] = data.hoverId;
// Necessary to query one of the selectedFeatures for its mapTileKey
node.data["featureIndex"] = featureIndex;
}
if (data.hasOwnProperty("mapId")) {
node.data["mapId"] = data.mapId;
Expand All @@ -174,15 +176,16 @@ export class InspectionService {
if (data.hasOwnProperty("sourceDataReferences")) {
node.data["sourceDataReferences"] = data.sourceDataReferences;
}
node.children = data.hasOwnProperty("children") ? convertToTreeTableNodes(data.children) : [];
node.children = data.hasOwnProperty("children") ? convertToTreeTableNodes(data.children, featureIndex) : [];
treeNodes.push(node);
}
return treeNodes;
}

let treeNodes: Array<TreeTableNode> = [];
if (this.selectedFeatureInspectionModel) {
for (const section of this.selectedFeatureInspectionModel) {
for (let i = 0; i < this.selectedFeatureInspectionModel.length; i++) {
const section = this.selectedFeatureInspectionModel[i];
const node: TreeTableNode = {};
node.data = {key: section.key, value: section.value, type: section.type};
if (section.hasOwnProperty("info")) {
Expand All @@ -191,7 +194,7 @@ export class InspectionService {
if (section.hasOwnProperty("sourceDataReferences")) {
node.data["sourceDataReferences"] = section.sourceDataReferences;
}
node.children = convertToTreeTableNodes(section.children);
node.children = convertToTreeTableNodes(section.children, i);
treeNodes.push(node);
}
}
Expand Down
Loading

0 comments on commit 75574a8

Please sign in to comment.