Opened 14 years ago

Last modified 10 years ago

#4721 closed defect

dijit.MasterTooltip getting wrong position when connected to GFX objects — at Version 3

Reported by: guest Owned by:
Priority: high Milestone: 1.3
Component: DojoX GFX Version: 0.9
Keywords: tooltip gfx Cc:
Blocked By: Blocking:

Description (last modified by Eugene Lazutkin)

Currently dijit.placeOnScreenAroundElement() is putting the MasterTooltip? in the incorrect location, as seen in the below example (kudos to jayantbsai for example and for identifying this). The tooltip position gets set to I'm not sure if the problem is in or in dijit.placeOnScreenAroundElement itself. Workaround is to just do a onmouseover event, correcting style={top: Xpx, left: Ypx};, but the tooltip flickers under this workaround since this is not really a good solution. My contact info is amcallis (at the domain] gmail:




<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="js/dojo/dijit/themes/tundra/tundra.css" type="text/css" rel="stylesheet" /> <title>GFX + Tooltip</title> <script type="text/javascript" djConfig="isDebug:true" src="js/dojo/dojo/dojo.js"></script> <script type="text/javascript">

dojo.require("dojox.gfx"); dojo.require("dojo.parser"); dojo.require("dijit.Tooltip");

function test() {

var surface = dojox.gfx.createSurface(dojo.byId("div"), 300, 300); var shape = surface.createRect({ x:100, y:100, width:100, height:100 }).setFill([0, 255, 0]).setStroke({ color:[255, 0, 0], width:2 }); shape.getEventSource().id = "foo";

var tooltip = new dijit.Tooltip({ id:"label", connectId:"foo" }, "wordOfTheDay");




</head> <body class="tundra">

<div id="div" style="width:300px; height:300px; border:1px solid #000; overflow:hidden;"></div> <span id="wordOfTheDay">longanimity</span>



Change History (3)

comment:1 Changed 14 years ago by bill

Milestone: 2.0

comment:2 Changed 14 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:3 Changed 13 years ago by Eugene Lazutkin

Description: modified (diff)

The code in the test case works only for DOM-based renderers (SVG, VML). It will not work for anything else.

Note: See TracTickets for help on using tickets.