Open jorisw opened 4 years ago
I've debugged the block of code I'm citing above and it's not the cause, in such that the offset.x
and offset.y
are retained past that block. A console.log(offset)
shows the values that I'm passing with viewOffset
, yet the viewport only reflects offset on drag.
Fixed if I pass width
and height
properties with our initialViewState
to match the viewport, e.g. window.innerHeight
, window.innerWidth
.
Fixed if I pass
width
andheight
properties with ourinitialViewState
to match the viewport, e.g.window.innerHeight
,window.innerWidth
.
Thanks
Whenever I pass a pre-set
viewOffset
to<LogViewer />
, like so:... the
y
setting is ignored until I drag the viewport, whilebearing
is picked up and reflected before I do anything.This happens to me when running either apps in
test/apps/viewer/
andexamples/getting-started/
.All I can find to cause this, is the overwriting of
offset.x
andoffset.y
incore/src/utils/viewport.js
:https://github.com/uber/streetscape.gl/blob/6a3549eba1ff122fe2135c87d576ac4dbe6ee255/modules/core/src/utils/viewport.js#L117-L124
Streetscape.gl 1.0.0 - 1.0.2.