def _constrain_zoom(self):
        """Constrain bounding box."""
        if self.xmin is not None:
            self._zoom[0] = max(self._zoom[0],
                                1. / (self._pan[0] - self.xmin))
        if self.xmax is not None:
            self._zoom[0] = max(self._zoom[0],
                                1. / (self.xmax - self._pan[0]))

        if self.ymin is not None:
            self._zoom[1] = max(self._zoom[1],
                                1. / (self._pan[1] - self.ymin))
        if self.ymax is not None:
            self._zoom[1] = max(self._zoom[1],
                                1. / (self.ymax - self._pan[1]))
def _constrain_zoom ( self ) : if self . xmin is not None : self . _zoom [ 0 ] = max ( self . _zoom [ 0 ] , 1. / ( self . _pan [ 0 ] - self . xmin ) ) if self . xmax is not None : self . _zoom [ 0 ] = max ( self . _zoom [ 0 ] , 1. / ( self . xmax - self . _pan [ 0 ] ) ) if self . ymin is not None : self . _zoom [ 1 ] = max ( self . _zoom [ 1 ] , 1. / ( self . _pan [ 1 ] - self . ymin ) ) if self . ymax is not None : self . _zoom [ 1 ] = max ( self . _zoom [ 1 ] , 1. / ( self . ymax - self . _pan [ 1 ] ) )
Constrain bounding box.