Skip to content

Commit

Permalink
Additional test fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
josephbirkner committed Sep 4, 2024
1 parent 932a0cd commit 23d52c0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion erdblick_app/app/inspection.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export class InspectionService {
this.selectedFeatureInspectionModel.push(...feature.inspectionModel());
this.selectedFeatureGeoJsonTexts.push(feature.geojson() as string);
this.isInspectionPanelVisible = true;
this.loadFeatureData();
});
});
this.loadFeatureData();

this.parametersService.setSelectedFeatures(this.selectedFeatures.map(f => f.key()));
});
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_;
ValueType type_ = ValueType::Null;
std::string hoverId_;
std::string hoverId_; // For highlight attribs/relations on hovering.
std::string info_;
std::vector<InspectionNode> children_;
JsValue direction_;
Expand Down
2 changes: 1 addition & 1 deletion libs/core/include/erdblick/rule.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class FeatureStyleRule
std::vector<FeatureStyleRule> firstOfRules_;

// Index of the rule within the style sheet
int32_t index_ = 0;
uint32_t index_ = 0;
};

}
2 changes: 1 addition & 1 deletion libs/core/include/erdblick/visualization.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class FeatureLayerVisualization
* Get a unique identifier for the map+layer+style+rule-id+highlight-mode.
* In combination with a tile id, this uniquely identifiers a merged corner tile.
*/
std::string getMapLayerStyleRuleId(const uint32_t& ruleIndex) const;
std::string getMapLayerStyleRuleId(uint32_t ruleIndex) const;

/// =========== Generic Members ===========

Expand Down
23 changes: 13 additions & 10 deletions libs/core/src/inspection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ JsValue InspectionConverter::convert(model_ptr<Feature> const& featurePtr)
push("layerId", "layerId", ValueType::String)->value_ = convertStringView(featurePtr->model().layerInfo()->layerId_);

// TODO: Investigate and fix the issue for "index out of bounds" error.
// Affects boundaries and lane connectors
// if (auto prefix = featurePtr->model().getIdPrefix()) {
// for (auto const& [k, v] : prefix->fields()) {
// convertField(k, v);
// }
// }
// for (auto const& [k, v] : featurePtr->id()->fields()) {
// convertField(k, v);
// }
// Affects boundaries and lane connectors
// if (auto prefix = featurePtr->model().getIdPrefix()) {
// for (auto const& [k, v] : prefix->fields()) {
// convertField(k, v);
// }
// }
// for (auto const& [k, v] : featurePtr->id()->fields()) {
// convertField(k, v);
// }

for (auto const& [key, value]: featurePtr->id()->keyValuePairs()) {
auto &field = current_->children_.emplace_back();
Expand Down Expand Up @@ -241,7 +241,10 @@ void InspectionConverter::convertRelation(const model_ptr<Relation>& r)
}
auto relGroupScope = push(relGroup);
auto relScope = push(JsValue(relGroup->children_.size()), nextRelationIndex_, ValueType::FeatureId);
relScope->value_ = JsValue(r->target()->toString());
relScope->value_ = JsValue::Dict({
{"mapTileKey", JsValue(r->model().id().toString())},
{"featureId", JsValue(r->target()->toString())},
});
relScope->hoverId_ = featureId_+":relation#"+std::to_string(nextRelationIndex_);
convertSourceDataReferences(r->sourceDataReferences(), *relScope);
if (r->hasSourceValidity()) {
Expand Down
2 changes: 1 addition & 1 deletion libs/core/src/visualization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void FeatureLayerVisualization::run()
}
}

std::string FeatureLayerVisualization::getMapLayerStyleRuleId(uint32_t const& ruleIndex) const
std::string FeatureLayerVisualization::getMapLayerStyleRuleId(uint32_t ruleIndex) const
{
return fmt::format(
"{}:{}:{}:{}:{}",
Expand Down

0 comments on commit 23d52c0

Please sign in to comment.