-
Notifications
You must be signed in to change notification settings - Fork 197
HARP-12581: Move TextElement construction into builders. #1988
Conversation
222e25b
to
c776a54
Compare
c776a54
to
f5630d8
Compare
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.
just some very minors... all in all I think this change is great and clears up a lot...
I wish we would not have the name "Poi" all over the code but something like "Marker" or "PointMarker" instead, but there is not much we can do about it at this point
import { assert, assertExists, LoggerManager } from "@here/harp-utils"; | ||
import * as THREE from "three"; | ||
import { Vector3 } from "three"; |
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.
THREE is already imported use THREE.Vector3
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
@@ -44,6 +39,38 @@ interface ImageTextureDef { | |||
pixelRatio?: number; | |||
} | |||
|
|||
function getPoiImageTexture(poiGeometry: PoiGeometry, index: number = 0): string | undefined { |
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.
just another minor, maybe you can drop the Poi in the name as its inside the PoiManager, getImageTexture might be enough... same for the funtions below
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
f5630d8
to
7cd844e
Compare
7cd844e
to
8d35177
Compare
8d35177
to
6265864
Compare
Codecov Report
@@ Coverage Diff @@
## master #1988 +/- ##
==========================================
+ Coverage 65.88% 66.20% +0.31%
==========================================
Files 294 295 +1
Lines 26262 26246 -16
Branches 5952 5910 -42
==========================================
+ Hits 17304 17376 +72
+ Misses 8958 8870 -88
Continue to review full report at Codecov.
|
Cleanup text element construction code to remove duplication. Preparation to set renderOrder for text elements.