update area via options
This commit is contained in:
parent
e67ec495d2
commit
819c5c747d
1 changed files with 8 additions and 0 deletions
|
@ -43,6 +43,14 @@ Ox.ImageViewer = function(options, self) {
|
||||||
})
|
})
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.update({
|
.update({
|
||||||
|
area: function() {
|
||||||
|
if (self.options.area && self.options.area.length == 4) {
|
||||||
|
var centerAndZoom = getCenterAndZoom(self.options.area);
|
||||||
|
self.options.center = centerAndZoom.center;
|
||||||
|
self.options.zoom = centerAndZoom.zoom;
|
||||||
|
setCenterAndZoom(true, true);
|
||||||
|
}
|
||||||
|
},
|
||||||
center: function() {
|
center: function() {
|
||||||
setCenterAndZoom(true, true);
|
setCenterAndZoom(true, true);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue