Conversation
…ious size properties
|
I added tests to cover the new sizeBasis property. Any feedback is appreciated |
test/render/test-cases/icon-layer.js
Outdated
| data: points, | ||
| iconAtlas: './test/data/rectangle.png', | ||
| iconMapping: { | ||
| rectangle: { |
There was a problem hiding this comment.
As is, the test doesn't prove much as you only have a single image. It could be made to pass even without the fix this PR adds just by adjusting the size
It would be better if your test image atlas had 4 road signs like you had in your issue which have different heights and the output would then show that they are all indeed the same width.
test/render/test-cases/icon-layer.js
Outdated
| iconMapping: { | ||
| tall: {x: 0, y: 0, width: 40, height: 80, mask: true, anchorY: 40}, | ||
| wide: {x: 40, y: 0, width: 80, height: 40, mask: true, anchorY: 20}, | ||
| square: {x: 120, y: 0, width: 60, height: 60, mask: true, anchorY: 30}, |
There was a problem hiding this comment.
Any reason you have mask: true? I would remove it
There was a problem hiding this comment.
Good catch, mask was not needed. I have removed it and updated the golden image so the tests should pass now. Thanks!
felixpalmer
left a comment
There was a problem hiding this comment.
Great addition, thanks!
PR for #9694