Trying to debug some code involving libjostle #8


  • Other
  • Replied
Open
Assigned to ckknight
  • _ForgeUser3358172 created this issue Nov 9, 2010

    What is the issue?

    I'm trying to get some more information on how libjostle works, specifically, how libjostle handles SetScale()

    Please provide any additional information below.

    I've been talking with Cladhaire, author of NinjaPanel, (and more famously, stuff like Clique, TomTom and Lightheaded) and we're trying to figure out why introducing a scale factor to resize NinjaPanel's bar causes the minimap, buffs, open ticket notification, and everything else attatched to the top of UIParent shoves everything downwards by an amount directly proportional to the scale introduced. I've uploaded two screenshots. Note the first screenshot. The only modification I've done to the code is to scale the top NinjaPanel upwards by 20%, and the end result is the second screenshot, everything pushed down about 1/4 down the screen.

    Our discussion can be found here: http://www.wowinterface.com/downloads/info11884-NinjaPanel#comments

  • _ForgeUser3358172 added the tags New Other Nov 9, 2010
  • _ForgeUser3358172 added an attachment Capture.PNG Nov 9, 2010

    Capture.PNG

  • _ForgeUser3358172 added an attachment WoWScrnShot_102710_043804.jpg Nov 9, 2010

    WoWScrnShot_102710_043804.jpg

  • _ForgeUser3358172 posted a comment Nov 20, 2010

    ...nothing? I mean, c'mon guys, yes, it's a library, but it could stand to have some comments in there to aid debugging!

  • Arrowmaster1 posted a comment Jan 7, 2011

    There are no active developers for this library anymore. If you and/or Cladhaire manage to solve this issue I'll make any changes needed.

  • Arrowmaster1 removed a tag New Jan 7, 2011
  • Arrowmaster1 added a tag Waiting Jan 7, 2011
  • _ForgeUser30210 posted a comment Jan 7, 2011
    Just a guess: Jostle uses the Frame:GetBottom method to discover the offset from the top.
    Returns the distance from the bottom/left edge of the screen to the requested edge of an object, scaled with the objects's effective scale.
    I guess that scaling the frame will actually decrease this value. Assume your bar is 1000 units from the bottom with scale 1, then it would be 500 units from the bottom with scale 2, even if the lower border does not visibly change. I would recommend changing this in libJostle to something like:
    frame:GetBottom() * frame:getScale()
    
    The attached file contains this changes (also for bottom edge). Please keep in mind that this is barely tested.

    Edited Jan 7, 2011
  • _ForgeUser30210 removed a tag Waiting Jan 7, 2011
  • _ForgeUser30210 added a tag Replied Jan 7, 2011
  • _ForgeUser30210 posted a comment Jan 7, 2011
    After thinking about it, this will only fix it if the frame in question is a second level frame (i.e., <tt>frame:GetParent() = UIParent</tt>) which should hold in almost any case. However, the real problem is, that Jostle:GetScreenTop is undocumented and does not explain how the number is to be interpreted.

    Edited Jan 7, 2011
  • _ForgeUser30210 posted a comment Jan 15, 2011
    Another version, should be more robust in the case of non UIParent children.

    Edited Jan 15, 2011

To post a comment, please login or register a new account.