mmo-grid
1 symbol · generated 5 Oct 2026
mmo-grid
mmo-grid.jhs:1Grid element to display a grid layout
- Extends
- CustomShadowElement
Index
| col | the number of columns | |
| row | the number of rows | |
| gap | the gap between the grid items | |
| customizable | if true, the grid is customizable | |
| ViewDefault static readonly accessor | ||
| customizable accessor | Get the customizable of the grid | |
| col accessor | Get the number of columns | |
| row accessor | Get the number of rows | |
| gap accessor | Get the gap of the grid | |
| init() | ||
| save() | Save the grid | |
| reset() | Reset the grid | |
| getGridRect(elem) | Get the grid rect of an element | |
| getGridCoord(pt) | Get the grid coordinate of a point | |
| getNodeAt(pt) | Get the node at a point | |
| isAvailable(rect) | Check if a rectangle is available | |
| updateCoords() | Update the coordinates of the grid | |
| doUpdateCoords() | Do the update of the coordinates of the grid | |
| (default) | the widgets of the grid, usually <mmo-widget>, each one placed on the cells its grid-w and grid-h ask for | |
| .dragging | add a border to the grid while dragging |
Attributes4
col
mmo-grid.jhsthe number of columns
col="3"
row
mmo-grid.jhsthe number of rows
row="3"
gap
mmo-grid.jhsthe gap between the grid items
gap="0px"
customizable
mmo-grid.jhsif true, the grid is customizable
customizable
Properties5
ViewDefault
staticreadonlyaccessormmo-grid.jhs:22customizable
accessormmo-grid.jhs:45Get the customizable of the grid
- Type
boolean
col
accessormmo-grid.jhs:140Get the number of columns
- Type
number
row
accessormmo-grid.jhs:159Get the number of rows
- Type
number
gap
accessormmo-grid.jhs:178Get the gap of the grid
- Type
number
Methods9
init()
mmo-grid.jhs:29save()
mmo-grid.jhs:74Save the grid
reset()
mmo-grid.jhs:81Reset the grid
getGridRect(elem)
mmo-grid.jhs:90Get the grid rect of an element
| elem | Element | - The element |
| returns | object | The grid rect |
getGridCoord(pt)
mmo-grid.jhs:104Get the grid coordinate of a point
| pt | object | - The point |
| returns | object | The grid coordinate |
getNodeAt(pt)
mmo-grid.jhs:117Get the node at a point
| pt | object | - The point |
| returns | Element | The node |
isAvailable(rect)
mmo-grid.jhs:126Check if a rectangle is available
| rect | object | - The rectangle |
| returns | boolean | The availability |
updateCoords()
mmo-grid.jhs:195Update the coordinates of the grid
doUpdateCoords()
mmo-grid.jhs:205Do the update of the coordinates of the grid
Slots1
(default)
mmo-grid.jhsthe widgets of the grid, usually <mmo-widget>, each one placed on the cells its grid-w and grid-h ask for
<slot>
CSS hooks1
.dragging
mmo-grid.jhsadd a border to the grid while dragging
.dragging