Constrain center in zoomify example

This commit is contained in:
Éric Lemoine
2014-10-16 19:42:26 +02:00
parent 323886cdda
commit 6d531cdc29

View File

@@ -45,6 +45,9 @@ var map = new ol.Map({
view: new ol.View({
projection: proj,
center: imgCenter,
zoom: 0
zoom: 0,
// constrain the center: center cannot be set outside
// this extent
extent: [0, -imgHeight, imgWidth, 0]
})
});