[core] Added ConstrainMode::{HeightOnly,WidthAndHeight}

ConstrainMode gives flexibility to our engine to choose between
constraining both vertically and horizontally, or just vertically
(default behavior).

Constrain in both axis means we can no longer pan the map beyond the map
boundaries. This fixes an issue where e.g. annotations disappear upon
crossing the map boundaries.
This commit is contained in:
Bruno de Oliveira Abinader
2015-11-17 17:19:54 +02:00
parent cb9b397985
commit adfac6f061
9 changed files with 93 additions and 33 deletions

View File

@@ -24,7 +24,7 @@ public:
FileSource& fileSource,
const std::function<void(std::exception_ptr error)>& callback)
: data_(MapMode::Still, GLContextMode::Unique, view.getPixelRatio()),
transform_(view),
transform_(view, ConstrainMode::HeightOnly),
callback_(callback) {
util::ThreadContext::setFileSource(&fileSource);