Hello fellow developers!
In the game I am developing, I am trying to move a card located in a stock component to a non-stock component, the player panel. Clearly, it exactly fits into situation C in the stock help page.
The information about situation C in that page says:
When you move a card from a stock item to something that is not a stock item:
-Insert the card as a classic HTML template (dojo.place / this.format_block).
-Place it on the Stock item with this.placeOnObject, using the Stock item HTML id (see above).
-Slide it to its new position with this.slideToObject.
-Remove the card from the Stock item with removeFromStockById.
If every card in the stock will eventually have to move to another player's panel (it's a draft process), does that mean I cannot use addToStockWithId for any card? Because that is mainly the reason for using the stock, to simplify the adding and removing cards from the collection of cards.
Another question I have is regarding the dojo.place instruction:
dojo.place(node, refNode, pos);
what is supossed to be the refNode parent of the card? The stock? Or just any random element in the page?
Thank you a lot in advance!!
In the game I am developing, I am trying to move a card located in a stock component to a non-stock component, the player panel. Clearly, it exactly fits into situation C in the stock help page.
The information about situation C in that page says:
When you move a card from a stock item to something that is not a stock item:
-Insert the card as a classic HTML template (dojo.place / this.format_block).
-Place it on the Stock item with this.placeOnObject, using the Stock item HTML id (see above).
-Slide it to its new position with this.slideToObject.
-Remove the card from the Stock item with removeFromStockById.
If every card in the stock will eventually have to move to another player's panel (it's a draft process), does that mean I cannot use addToStockWithId for any card? Because that is mainly the reason for using the stock, to simplify the adding and removing cards from the collection of cards.
Another question I have is regarding the dojo.place instruction:
dojo.place(node, refNode, pos);
what is supossed to be the refNode parent of the card? The stock? Or just any random element in the page?
Thank you a lot in advance!!