-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Move shape annotation click handling to core #10267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor details.
@Override | ||
public List<Annotation> obtainAllIn(RectF rectangle) { | ||
// convert Rectangle to be density dependant | ||
float pixelRatio = nativeMapView.getPixelRatio(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about extracting // convert Rectangle to be density dependant
block of code into a private method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍, instead of private, I moved it to NativeMapView and refactored similar code for DRY reasons.
rectangle.right / pixelRatio, | ||
rectangle.bottom / pixelRatio); | ||
|
||
List<Annotation> shapeAnnotations = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here ☝️ when getting the list of shapeAnnotations
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
d787edf
to
c7a9108
Compare
Closes #10234, refs #9984 and #9443.
This moves the logic as shown in #9984 to core.