-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix#415 #417
Fix#415 #417
Conversation
+1 can you bump version, update readme and merge? i'll pull and upload to jcenter asap |
@peterLaurence i posted this in another PR a while back, ICYMI:
|
I don't know how i missed your message above.. sorry for that. As for things i'd like to achieve : have a mode that loads tiles so that the user don't even see the loading. But something efficient (like don't just extend the viewport). I don't know if its feasible. We will see :) |
Sounds great. I created a project, will start to fill it in tonight. I'll also publish the latest to bintray tonight. Also, I like your idea - we might not be able to get it perfect, but I get we can come close. I'll ping you later. Thanks @peterLaurence |
Ok great! I will look into that tomorrow when I get time. |
sounds great also, 2.2.7 is on jcenter thanks for the fix |
Hey Mike,
I don't know if you're aware of #415 : the OP describes the problem pretty well. To summarize, when the MinimumScaleMode#FIT was introduced, the logic to calculate the constrained X/Y scroll position needed to be adapted. Well, not exactly. In fact, in most cases there is no issue. But when a developer extends the
TileView
and overrides (as he's allowed to) thegetScrollMinX
andgetScrollLimitX
to return something different than 0, then the whole TileView is shifted at minimum scale.Investigating on this, i found that it was not the only issue. Scrolling slowly at the boundaries of the TileView would make the scroll position change from eg -100 to 0 without any transition (which is a weird behavior). This happens when the scale is equal to
mMinimumScaleY
ormMinimumScaleX
, depending on the shape of the tileset.So i worked on the logic of
getConstrainedScrollX
andgetConstrainedScrollY
to work also when non zero return values are defined forgetScrollMinX
,getScrollLimitX
,getScrollMinY
,getScrollLimitY
.I came up with this implementation, which i tested and so did the author of #415.