Index

mmo-grid

1 symbol · generated 5 Oct 2026

element

mmo-grid

mmo-grid.jhs:1

Grid element to display a grid layout

<mmo-grid col="3" row="3" gap="0px" customizable></mmo-grid>
Extends
CustomShadowElement

Index

colthe number of columns
rowthe number of rows
gapthe gap between the grid items
customizableif true, the grid is customizable
ViewDefault static readonly accessor
customizable accessorGet the customizable of the grid
col accessorGet the number of columns
row accessorGet the number of rows
gap accessorGet 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
.draggingadd a border to the grid while dragging

Attributes4

customizable

mmo-grid.jhs

if true, the grid is customizable

customizable

Properties5

customizable

accessormmo-grid.jhs:45

Get the customizable of the grid

get customizable() set customizable(value)
Type
boolean

col

accessormmo-grid.jhs:140

Get the number of columns

get col() set col(value)
Type
number

row

accessormmo-grid.jhs:159

Get the number of rows

get row() set row(value)
Type
number

gap

accessormmo-grid.jhs:178

Get the gap of the grid

get gap() set gap(value)
Type
number

Methods9

getGridRect(elem)

mmo-grid.jhs:90

Get the grid rect of an element

getGridRect(elem)
elemElement- The element
returnsobjectThe grid rect

getGridCoord(pt)

mmo-grid.jhs:104

Get the grid coordinate of a point

getGridCoord(pt)
ptobject- The point
returnsobjectThe grid coordinate

getNodeAt(pt)

mmo-grid.jhs:117

Get the node at a point

getNodeAt(pt)
ptobject- The point
returnsElementThe node

isAvailable(rect)

mmo-grid.jhs:126

Check if a rectangle is available

isAvailable(rect)
rectobject- The rectangle
returnsbooleanThe availability

doUpdateCoords()

mmo-grid.jhs:205

Do the update of the coordinates of the grid

doUpdateCoords()

Slots1

(default)

mmo-grid.jhs

the 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.jhs

add a border to the grid while dragging

.dragging