DBC22-6776: frontend implementation for grouping camera icons - #1385
DBC22-6776: frontend implementation for grouping camera icons#1385bcgov-brwang wants to merge 2 commits into
Conversation
36457bf to
50a4248
Compare
f20f07b to
0814e34
Compare
a66ba91 to
0797e75
Compare
e4c8f77 to
b1f31c9
Compare
973f00b to
625edf8
Compare
|
draft 2 draft 3 draft 4 draft 5 draft 6 DBC22-6776: fixed broken test cases removed commented out code DBC22-6776: switch to fixed pixels to cluster icons DBC22-6776: removed variables not used DBC22-6776: updated grouped icons styling DBC22-6776: updated grouped icon text color DBC22-6776: updated text font in grouped icon DBC22-6776: fixed broken test case DBC22-6776: excluded index.js to void unit test canclling during Analysis progress DBC22-6776: fixed sonar scan alerts DBC22-6776: fixed sonar scan alerts part 2 DBC22-6776: single click on group icon takes user to next zoom level
aae7d43 to
c056070
Compare
|
| updateReferenceFeature, | ||
| setLoadingLayers | ||
| setLoadingLayers, | ||
| 50 |
There was a problem hiding this comment.
what is this magic number here?
| if (size === 1) { | ||
| const cam = features[0]; | ||
| if (cam.get('clicked')) return cameraStyles.active; | ||
| if (cam.get('hovered')) return cameraStyles.hover; |
There was a problem hiding this comment.
are we missing unread cam stylings here?
| @@ -62,7 +121,11 @@ export function updateCamerasLayer(cameras, layer, setLoadingLayers) { | |||
| }, {}); | |||
|
|
|||
| for (const feature of layer.getSource().getFeatures()) { | |||
There was a problem hiding this comment.
This line might cease to work for grouped cameras but I've not tested this.
This may need to be
layer.getSource().getSource();
or
// Cluster source (what layer.getSource() returns now)
const clusterSource = layer.getSource();
// Real cameras — clustered or not, all of them live here
const cameraSource = clusterSource.getSource();
then use cameraSource instead.
|
|
||
| if (!clickedFeature.get('type')) { | ||
| clickedFeature = features[0].values_?.features[0]; | ||
| } |
There was a problem hiding this comment.
what is this repetition here? In addition, this whole block needs more comments on key operations
| } | ||
| catch { | ||
| feature.values_.features[0].setCameraStyle('static'); | ||
| } |
There was a problem hiding this comment.
the try/catchs here are workarounds, we should make sure we always have a feature instead (see comment regarding layer source)



📝 Submitter
🔗 JIRA Ticket
✅ Quality Assurance & Requirements
⚙️ Configuration & Environment
🧪 How to Test (if required)
🔍 Reviewer Checklist