560 |
560 |
561 if(rect.bottom > (container_rect.bottom - 2 * _options.tooltip_padding - 10)) { |
561 if(rect.bottom > (container_rect.bottom - 2 * _options.tooltip_padding - 10)) { |
562 _selector.css({ |
562 _selector.css({ |
563 'overflow-x': 'hidden', |
563 'overflow-x': 'hidden', |
564 'overflow-y': 'scroll', |
564 'overflow-y': 'scroll', |
565 'max-height':(container_rect.bottom - 2 * _options.tooltip_padding - 10 - rect.top) + 'px' |
565 'max-height':(container_rect.bottom - 2 * _options.tooltip_padding - 5 - rect.top) + 'px' |
566 }); |
566 }); |
567 } |
567 } |
568 |
568 |
569 var _height = _selector.outerHeight() + 2 * _options.tooltip_padding, |
569 var _height = _selector.outerHeight() + 2 * _options.tooltip_padding + 5, |
570 _isLeft = (_coords.x < paper.view.center.x ? 1 : -1), |
570 _isLeft = (_coords.x < paper.view.center.x ? 1 : -1), |
571 _left = _coords.x + _isLeft * (_xmargin + _options.tooltip_arrow_length), |
571 _left = _coords.x + _isLeft * (_xmargin + _options.tooltip_arrow_length), |
572 _right = _coords.x + _isLeft * (_xmargin + _options.tooltip_arrow_length + _options.tooltip_width), |
572 _right = _coords.x + _isLeft * (_xmargin + _options.tooltip_arrow_length + _options.tooltip_width), |
573 _top = _coords.y - _height / 2; |
573 _top = _coords.y - _height / 2; |
574 if (_top + _height > (paper.view.size.height - _options.tooltip_margin)) { |
574 if (_top + _height > (paper.view.size.height - _options.tooltip_margin)) { |