Abnormal movement of the div after slideToObjectAndDestroy or fadeOutAndDestroy

Game development with Board Game Arena Studio
Post Reply
kenciro
Posts: 2
Joined: 27 March 2017, 19:55

Abnormal movement of the div after slideToObjectAndDestroy or fadeOutAndDestroy

Post by kenciro »

Abnormal movement of the div after slideToObjectAndDestroy or fadeOutAndDestroy

Good morning,
I have a DIV with her DIV children:

Code: Select all

<div>
<div id="token_1" class="token [...]"></div>
<div id="token_2" class="token [...]"></div>
<div id="token_3" class="token [...]"></div>
<div id="token_4" class="token [...]"></div>
<div id="token_5" class="token [...]"></div>
</div>
When I destroy a child using slideToObjectAndDestroy or fadeOutAndDestroy all childrens, declared under the one erased, moving 100 | 150 pixels up in the browser. Childrens declared up the one erased remain in their position.

Can someone explain this abnormal movement of children?
User avatar
Andy_K
Posts: 51
Joined: 13 February 2014, 15:59

Re: Abnormal movement of the div after slideToObjectAndDestroy or fadeOutAndDestroy

Post by Andy_K »

Are your tokens using position absolute?
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: Abnormal movement of the div after slideToObjectAndDestroy or fadeOutAndDestroy

Post by Victoria_La »

Yes, these function only work with absolute positioning which I personally don't like at all.
I created similar functions to use on object with no inline positioning, the available in sharedcode project here
https://github.com/elaskavaia/bga-share ... redcode.js
Post Reply

Return to “Developers”