Jump to content

2.5 babylon layout marginAlignment bug?


Lightnet
 Share

Recommended Posts

Where is Mr. Nockawa?  hmm.  One thing to keep in mind... is that ALL things in Canvas2d system... are referenced to the lower left corner... even your blue boxes.  I don't know if that is pertinent.  I just took a quick browse of your playground demo, but I will look at it closer... a bit later today.

It sure would be nice to have a showBoundingBox = true... available on Group2D, eh?  That way we could determine if their marginAlignment: "h: right, v: top" (etc) is taking into consideration... the size of the Rect2d's that they contain.

I'm no expert on Canvas2D things... but I plan to become one, time permitting.  :)

update:  http://www.babylonjs-playground.com/#1Q11FD#3

I'm not seeing any issues/problems, yet.  I removed all the X/Y values in the rectangles... and I am using ONLY the marginAlignment parameter of the Group2D's.  Looks pretty good.  Needless to say, i also green-backgrounded the canvas... to make sure it was aligning okay. 

@Lightnet... are you still seeing something screwed-up?  If so, could you re-show me?  thx.

Link to comment
Share on other sites

Hi again.  I don't see it.  Looks correct to me, on a desktop.  Or I'm not noticing something.  Could you publish/paste a screen grab image, maybe with an arrow pointing to what you see?

I DO see a little problem... when I restore window and open dev tools.

http://webpages.charter.net/wingthing/misc/margincheck.jpg

Center rect along left side... is high.  (but aren't we all? hah ahem).  *scratch scratch*  Are you on a mobile, Lightnet?  *scratch scratch*

Sorry if I am missing something.  Perhaps others see something that I cannot?  Comments?  Others?  More screen grabs?  Help!  :D

Here's un-restored with no dev tools window...  http://webpages.charter.net/wingthing/misc/margincheck2.jpg

Link to comment
Share on other sites

On 12/1/2016 at 5:30 AM, Lightnet said:

I wonder if the layout has some bugged.

http://www.babylonjs-playground.com/#1Q11FD#1

Since I am debug in console log it hard to determined it. The offset is bit way much to align right. Not perfect corner.

There's indeed a bug in margin/alignment computation when you're doing it on a Primitive (a Group2D in your case) which is "autoSized" by the content. That's the bug I'm currently working on, but unfortunately I don't much time recently to contribute, hope I'll be able to resume asap..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...