LibJostle-3.0

8 - Trying to debug some code involving libjostle

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

  • Capture.PNG
  • WoWScrnShot_102710_043804.jpg
User When Change
Graveeater Jan 07, 2011 at 12:45 UTC Changed status from Waiting to Replied
Arrowmaster Jan 07, 2011 at 09:25 UTC Changed status from New to Waiting
knalty Nov 10, 2010 at 04:03 UTC

Added attachment WoWScrnShot_102710_043804.jpg

knalty Nov 10, 2010 at 04:03 UTC

Added attachment Capture.PNG

knalty Nov 10, 2010 at 04:02 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 5 comments
  • Avatar of Graveeater Graveeater Jan 15, 2011 at 15:24 UTC - 0 likes
    Another version, should be more robust in the case of non UIParent children.
    Name Size MD5
    LibJostle-3.0.lua 16.7 KiB 59b963e788bc...
  • Avatar of Graveeater Graveeater Jan 08, 2011 at 01:10 UTC - 0 likes
    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.
    Last edited Jan 08, 2011 by Graveeater: formatting
  • Avatar of Graveeater Graveeater Jan 07, 2011 at 12:45 UTC - 0 likes
    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.
    Last edited Jan 07, 2011 by Graveeater: typo
    Name Description Size MD5
    LibJostle-3.0.lua Better fix. 17.1 KiB 931e84ba2323...
  • Avatar of Arrowmaster Arrowmaster Jan 07, 2011 at 09:25 UTC - 0 likes

    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.

  • Avatar of knalty knalty Nov 21, 2010 at 03:06 UTC - 0 likes

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

  • 5 comments

Facts

Last updated
Mar 30, 2012
Reported
Nov 10, 2010
Status
Replied - Someone has replied after waiting for more information.
Type
Other - Some other kind of issue
Priority
Medium - Normal priority.
Votes
1

Reported by

Possible assignees