Skip to content

Commit

Permalink
Attach mapId to feature inspection nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
josephbirkner committed Sep 18, 2024
1 parent aa4692d commit 4c209ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions erdblick_app/app/pointmerge.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ type Cartographic = {x: number, y: number, z: number};
export interface MergedPointVisualization {
position: Cartographic,
positionHash: PositionHash,
pointParameters?: Record<string, any>|null, // Point Visualization Parameters for call to PointPrimitiveCollection.add().
labelParameters?: Record<string, any>|null, // Label Visualization Parameters for call to LabelCollection.add().
pointParameters: any, // Point Visualization Parameters for call to PointPrimitiveCollection.add().
labelParameters: any, // Label Visualization Parameters for call to LabelCollection.add().
featureIds: Array<TileFeatureId>
}

Expand Down Expand Up @@ -60,10 +60,10 @@ export class MergedPointsTile {
existingPoint.featureIds.push(fid);
}
}
if (point.pointParameters !== undefined) {
if (point.pointParameters) {
existingPoint.pointParameters = point.pointParameters;
}
if (point.labelParameters !== undefined) {
if (point.labelParameters) {
existingPoint.labelParameters = point.labelParameters;
}
}
Expand Down
2 changes: 1 addition & 1 deletion erdblick_app/app/search.panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ export class SearchPanelComponent implements AfterViewInit {
return;
}
this.dialog.close(event);
}``
}
}

selectHistoryEntry(index: number) {
Expand Down
2 changes: 1 addition & 1 deletion libs/core/include/erdblick/inspection.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class InspectionConverter
{
JsValue key_;
JsValue value_;
JsValue mapId_;
std::optional<JsValue> mapId_;
ValueType type_ = ValueType::Null;
std::string hoverId_; // For highlight attribs/relations on hovering.
std::string info_;
Expand Down
2 changes: 2 additions & 0 deletions libs/core/src/inspection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ JsValue InspectionConverter::InspectionNode::toJsValue() const
newDict.set("children", childrenToJsValue());
if (!geoJsonPath_.empty())
newDict.set("geoJsonPath", JsValue(geoJsonPath_));
if (mapId_)
newDict.set("mapId", *mapId_);
if (!sourceDataRefs_.empty()) {
auto list = JsValue::List();
for (const auto& ref : sourceDataRefs_) {
Expand Down

0 comments on commit 4c209ec

Please sign in to comment.