Page 1 of 1

ebg/zone doesn't move things after placeInZone

Posted: 20 May 2024, 19:32
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

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

Posted: 21 May 2024, 18:25
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)?

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

Posted: 21 May 2024, 20:10
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.

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

Posted: 22 May 2024, 08:17
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.

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

Posted: 22 May 2024, 12:12
by imralav
I didn't know there is a discord server for BGA devs, awesome, thanks for linking it!