Is there any documentation listing the functions for the dojo toolkit? I'm trying to undrestand it, and find a function to do something, however, I can't seem to find any good documentation on it?
(is this the best there is:
https://dojotoolkit.org/reference-guide ... index.html
)
For example . in Chess game, there is this block of code:
which is responsible for "creating" a piece and placing it in the "board" div layer (as defined in this .tpl section):
That much I've understood. And in fact, my learning "game", uses multiple boards, so I have 3 board div "layers", and I successfully create all pieces on their proper boards ...
and then I call the dojo call like this:
and this works perfectly ... until the piece moves from 1 board to another. At this point, the piece "vanishes" (ie moves behind the other board layer), and only reappears upon F5/refresh. (when the code re-loads/re-draws, and re-places it on the proper board via the above dojo.place call)
I've tried adding the dojo.place in the spot where the piece moves, however, that leads to other issues:
- new piece created
- no events attached
- old piece still exists, albeit hidden behind layer ..
... etc.
so I'm trying to understand the other functions available in dojo that may help me?
(is this the best there is:
https://dojotoolkit.org/reference-guide ... index.html
)
For example . in Chess game, there is this block of code:
Code: Select all
dojo.place( this.format_block('jstpl_piece', {
piece_id:piece.piece_id,
piece_color:piece.piece_color,
piece_type:piece.piece_type
} ), $ ( 'board' ) );
Code: Select all
<div id="board" class="{BOARD_TYPE}">
Code: Select all
<div id="board_0"
...
<div id="board_1"
...
<div id="board_2"
Code: Select all
$board = 'board_' + $z;
dojo.place( this.format_block('jstpl_piece', {
piece_id:piece.piece_id,
piece_color:piece.piece_color,
piece_type:piece.piece_type
} ), $ ( $board ) );
I've tried adding the dojo.place in the spot where the piece moves, however, that leads to other issues:
- new piece created
- no events attached
- old piece still exists, albeit hidden behind layer ..
... etc.
so I'm trying to understand the other functions available in dojo that may help me?