Module:Dimensions/doc

This is the documentation page for Module:Dimensions

An icon from the Wikimedia Codex library.
This is a documentation subpage for Module:Dimensions
It contains usage information, categories, and other content that is not part of the original Module page.
Function list
L 21 — methodtable:setDimensions
L 33 — methodtable:renderDimensions
L 84 — Dimensions.new
L 104 — Dimensions._main
L 110 — Dimensions.example

Usage instructions

Config

Dimensions.new( config )
Config options
{
  "color": "hex color of the border and + in the center. Defaults to #5c5c5c",
  "backgroundColor": "hex color of the background. Defaults to #313238",
  "elementSize": "size of the individual size grids. Defaults to 40px"
}

Set dimensions

instance:setDimensions( width, height)

Render

instance:renderDimensions()

Example

local instance = Dimensions.new()
instance:setDimensions(4, 2)
instance:renderDimensions()

or

Dimensions.main(nil, 4, 2)