Disabled state
Root element of the plugin
Height of the image
Width of the image
Current options
Pending pieces
Height for each piece
Width for each piece
All the SnapPuzzlePieces that conforms the puzzle
Jquery element that will contain all the pieces
Jquery object with all the pieces
All the SnapPuzzlePieces as matrix
Control of the resize event
Jquery element that will contain all the slots
Jquery object with all the slots
Source of the image
Wrapper element for the widget.
Apply the css classes for options
Mark the widget as completed Triggers the [[SnapPuzzleEvents.end]] event
Construct the puzzle
Initialize t he SnapPuzzlePiece for a piece and slot
Creation of the widget
Creates each piece
Creates the container for pieces
Creates each slot
Creates the container for slots
Creates the wrapper for the widget
Internal destroy. Only destroys the markup and events, the instance of the widget still remains. Used to recreate the widget
JQuery ui function to get the default options
Invoked when a piece is dropped inside of the pieces container. Resets the classes
Invoked when a piece is placed. If the piece is correct, increment the completed counter. When all the pieces are placed correctly, triggers the [[SnapPuzzleEvents.end]] event
Invoked when the wrapper dimensions changes. Updates the pieces and slots
Invoked by jquery widget
Destroy the component
Disable the widget
Enable the widget
Refresh the dimensions and positions of the pieces and slots
Reset the puzzle reverting the pieces and resetting the progress.
Solve the puzzle. Multiple options are available
Generated using TypeDoc
Puzzle game