ExtJS Quicktip constrains problem

天涯浪子 提交于 2020-01-01 18:16:10

问题


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);
}


回答1:


You may want to look at the showAt method:

tip.showAt([x,y]);

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

EDIT: 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



来源:https://stackoverflow.com/questions/4967511/extjs-quicktip-constrains-problem

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!