Skip to content
Snippets Groups Projects

fix(vector-map-glyph): add image scale to calculate correct image size and and...

Merged Miłosz Grocholewski requested to merge feat/MIN-110-overlays-element-background into development
15 files
+ 96
36
Compare changes
  • Side-by-side
  • Inline
Files
15
@@ -27,7 +27,15 @@ export const onMapLeftClick =
let featureAtPixel: FeatureLike | undefined;
mapInstance.forEachFeatureAtPixel(pixel, (feature, ) => {
if(feature.get('id') && [...Object.values(FEATURE_TYPE)].includes(feature.get('type')) && feature.get('zIndex') >= 0) {
if(
feature.get('id') &&
(
feature.get('type') === FEATURE_TYPE.COMPARTMENT && feature.get('filled') ||
[...Object.values(FEATURE_TYPE)].includes(feature.get('type')) && feature.get('type') !== FEATURE_TYPE.COMPARTMENT
)
&& feature.get('zIndex') >= 0
&& !feature.get('hidden')
) {
featureAtPixel = feature;
return true;
}
@@ -53,7 +61,7 @@ export const onMapLeftClick =
const type = featureAtPixel.get('type');
const id = featureAtPixel.get('id');
if([FEATURE_TYPE.ALIAS, FEATURE_TYPE.GLYPH].includes(type)) {
if([FEATURE_TYPE.ALIAS, FEATURE_TYPE.GLYPH, FEATURE_TYPE.COMPARTMENT].includes(type)) {
await leftClickHandleAlias(dispatch)(featureAtPixel, modelId);
} else if (type === FEATURE_TYPE.REACTION) {
clickHandleReaction(dispatch)(modelElements, reactions, id, modelId);
Loading