Opened 15 years ago

Closed 11 years ago

#4721 closed defect (fixed)

dijit.MasterTooltip getting wrong position when connected to GFX objects

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

Description (last modified by bill)

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">

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

  <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 (13)

comment:1 Changed 15 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 14 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.

comment:4 Changed 14 years ago by bill

Description: modified (diff)

This ticket looks related to #6968. BTW, I'm fine w/rolling in the code from charting/action2d/Tooltip.js into place.js, so that placeAroundElement() works on a rectangle too, but that won't solve the whole problem. dijit.Tooltip isn't meant to work on GFX objects (out of the box) and not sure I want to add code for that into dijit.

comment:5 Changed 14 years ago by bill

Component: DijitDojoX GFX
Owner: set to Eugene Lazutkin

Talked to Eugene about this. He's going to make a separate Tooltip widget for GFX, after making a few changes to dijit to make this easier, specifically splitting the current dijit.placeOnScreenAroundElement() into dijit.placeOnScreenAroundElement() and dijit._placeOnScreenAroundRect()... although let's first wait and see what things change because of #6968.

comment:6 Changed 14 years ago by Eugene Lazutkin

(In [14134]) Small restructuring of dijit.placeOnScreenAroundElement() into two functions with the same API and semantics. Refs #4721. !strict

comment:7 Changed 14 years ago by Eugene Lazutkin

Consulted with Alex (#6968) --- he'll be happy with the rectangle object.

comment:8 Changed 14 years ago by Eugene Lazutkin

(In [14259]) Implementing the registry for placement processors. Thx Bill Keese! Refs #4721. !strict

comment:9 Changed 14 years ago by Eugene Lazutkin

(In [14261]) charting: removing now unnecessary code after changes to Fixing a minor typo. Refs #4721. !strict

comment:10 Changed 14 years ago by Eugene Lazutkin

(In [14269]) Implementing the placement registry with AdapterRegistry? on Bill's suggestion. Refs #4721. !strict

comment:11 Changed 14 years ago by Eugene Lazutkin

Milestone: 1.3future

Moving all open ticketd to the future.

comment:12 Changed 13 years ago by Eugene Lazutkin

Status: newassigned

comment:13 Changed 11 years ago by bill

Milestone: future1.3
Resolution: fixed
Status: assignedclosed

It seems like this is already fixed, and just didn't get closed. We have tooltips on charts now, as an example. Please reopen if there's still an issue. See also #10794.

Note: See TracTickets for help on using tickets.