PDA

View Full Version : Tooltip Anchor should move dynamically



AtulDawkhare
15 Nov 2012, 2:49 AM
Hi
I am using extjs 4.1

I am showing tooltip on mouse over of some image. Now it is working fine.
But , I want to move the tooltip anchor dynamically, i.e. when if there is no space , then tooltip gets shifted to above side, but the anchor is not at specific position i.e. ideally it should be pointing to Image as shown in the images.


i.e. I am showing image on mouse over of Red icon, but as there is no space so tootip shifted above but anchor is pointing at wrong position.
40079


My code is like this.


anchor: 'left',
id : 'toolTipCmp',
constrainPosition:true,
anchorSize : {
width : 400,
height : 600
},


If I remove the "anchor" config, I cant see the icon.

So my requirement is , I want to show the icon , but it should move dynamically as tooltip gets move/ shift.

i.e. in the image the Icon should point to Red image Only.

I hope I am able to explain well here.
Please suggest me what can be done here.