ebg/zone doesn't move things after placeInZone

Game development with Board Game Arena Studio
Post Reply
imralav
Posts: 23
Joined: 02 February 2024, 08:56

ebg/zone doesn't move things after placeInZone

Post by imralav »

Hello fellow devs,

I stumbled upon an issue when trying to incorporate ebg/zone into my project. The end result is that all items managed by ebg/zone have position of

Code: Select all

top: 0px; left: 0px;
, even though I can confirm from debugging the code that the coordinates are calculated properly in this code from ebg/zone library:

Code: Select all

var h = e.fx.slideTo({
    node: l,
    top: d.y,
    left: d.x,
    duration: c,
    unit: "px"
});
(h = this.page.transformSlideAnimTo3d(h, l, c, null)).play()
Here, the "top" and "left" properties are properly calculated according to item width and height I set during ebg/zone creation.

Please let me know if any of you happen to know the reason for this behavior and potential solution.

Best regards
imralav
User avatar
vurtan
Posts: 42
Joined: 13 June 2020, 19:54

Re: ebg/zone doesn't move things after placeInZone

Post by vurtan »

Hi imralav,

I had the same problem. There is something with the css, width and height. I can't recall right now.
Just looked at you project, it seems you removed the ebg.zone and replaced it with a flexbox layout.

Are you still want to use the component (it is quite powerfull after that hurdle)?
imralav
Posts: 23
Joined: 02 February 2024, 08:56

Re: ebg/zone doesn't move things after placeInZone

Post by imralav »

vurtan wrote: 21 May 2024, 18:25 Hi imralav,

I had the same problem. There is something with the css, width and height. I can't recall right now.
Just looked at you project, it seems you removed the ebg.zone and replaced it with a flexbox layout.

Are you still want to use the component (it is quite powerfull after that hurdle)?
Yeah, I needed something quick to progress with the project so I went with flexbox and it looks decent. I will come back to using ebg/zone once I figure out what the problem is exactly.
I had a similar idea that something about positioning or width and height is the issue, but I couldn't find it still.
User avatar
vurtan
Posts: 42
Joined: 13 June 2020, 19:54

Re: ebg/zone doesn't move things after placeInZone

Post by vurtan »

In case you come back, feel free to mesasge me. Or come to the Discord of the bga-developers (https://discord.com/invite/4q7dz4F5d3) to get help.
imralav
Posts: 23
Joined: 02 February 2024, 08:56

Re: ebg/zone doesn't move things after placeInZone

Post by imralav »

I didn't know there is a discord server for BGA devs, awesome, thanks for linking it!
Post Reply

Return to “Developers”