ExtJS Quicktip限制问题 [英] ExtJS Quicktip constrains problem

查看:95
本文介绍了ExtJS Quicktip限制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经定义了一个列渲染器,它创建一个包含ext.qtip属性的HTML片段来创建快速提示。一切工作正常,图像呈现在网格单元格中,当我将鼠标悬停在图像上时,显示的是较大图像的工具提示...全部不错,但底行上的快捷方式扩展到面板的限制之外,是否有任何方式使它保持在面板边界内?

I've got a column renderer defined that creates a HTML fragment which contains the ext.qtip attributes to create a quicktip. All works fine, the image renders in the grid cell, when i hover over the image a tooltip with the larger image is shown ... all nice but the quicktip on the bottom row expands beyond the constraints of the panel, is there any way to make it stay inside the panel boundaries?

var thumbRenderer = function(value, meta, record){
    var thumbPath   = Config.baseUrl + 'images/thumb/' + record.get('filename');
    var previewPath = Config.baseUrl + 'images/big/' + record.get('filename');
    return String.format('<img src="{0}" ext:qwidth="312" ext:qtip="<img style=\'margin: 2px 0;width:300px;\' src=\'{1}\' />" width="60" class="pic" />', thumbPath, previewPath);
}

推荐答案

你可能想看看showAt方法:

You may want to look at the showAt method:

tip.showAt([x,y]);

其中x和y是相应的x和y坐标位置。

Where x and y are the respective x and y co-ordinate positions.

编辑:您还可以在QuickTip实例上使用 showBy()方法:

You can also use the showBy() method on a QuickTip instance:

http:// dev。 sencha.com/deploy/dev/docs/source/Tip.html#method-Ext.Tip-showBy

这篇关于ExtJS Quicktip限制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆