Skip to content

Commit

Permalink
Add documentation for mm-grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Moore committed Sep 30, 2015
1 parent 0ebe51f commit deb6b4b
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 23 deletions.
5 changes: 5 additions & 0 deletions src/mm-dropdown/doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
{
"name":"reset",
"description":"Resets the dropdown to it's default state."
},
{
"name":"requestInitialization",
"description":"Under especially unusual circumstances, the dropdown may not initialize (nor render) properly. This method can be invoked to correct any such issue. Generally, developers should never need to call this method - however, it should be idempotent (and thus safe to call multiple times successively).",
"arguments":[]
}
],
"events": [
Expand Down
121 changes: 98 additions & 23 deletions src/mm-grid/doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,41 @@
},
{
"name":"itemTemplate",
"type":"String / Object",
"description":"A string pointing to a custom item template ID or template DOM fragment",
"type":"String",
"description":"A string pointing to a custom item template by ID. Should be explicitly assigned if 'itemTemplateElement' is not.",
"attribute":"item-template",
"optional":true,
"default":"",
"options":[]
"default":""
},
{
"name":"viewportWidth",
"type":"Integer",
"attribute":"viewport-width",
"description":"The width in pixels of the internal grid viewport. (For grids that expand beyond their container)",
"name":"itemTemplateElement",
"type":"Object",
"description":"The custom item template DOM fragment. Should be explicitly assigned if 'itemTemplate' is not.",
"attribute":"item-template-element",
"optional":true,
"default":"",
"options":[]
"default":""
},
{
"name":"selectable",
"type":"Boolean",
"description":"Enable selectable grid items.",
"optional":true,
"default":"false",
"options":[]
"default":"false"
},
{
"name":"expandable",
"type":"Boolean",
"description":"Enable expandable grid items.",
"optional":true,
"default":"false",
"options":[]
"default":"false"
},
{
"name":"sortField",
"type":"String",
"attribute": "sort-field",
"description":"Set/Get the current sort data field",
"description":"Set/Get the current sort data field.",
"optional":true,
"default":"",
"options":[]
"default":""
},
{
"name":"sortOrder",
Expand All @@ -67,18 +62,98 @@
"readOnly":true,
"attribute":"N/A",
"description":"Returns array of selected items.",
"default":"[]",
"options":[]
"default":"[]"
},
{
"name":"expanded",
"type":"Boolean",
"description":"Whether or not the grid has expanded all of its items.",
"optional":true,
"default":"false"
},
{
"name":"isLoading",
"type":"Boolean",
"description":"Whether or not the grid should indicate that it is globally waiting for data to load.",
"optional":true,
"default":"false"
},
{
"name":"scope",
"type":"Object",
"description":"The content scope that is passed to the grid's items - typically the grid itself.",
"optional":false,
"default":"the grid itself"
},
{
"name":"gpu",
"type":"String",
"description":"Indication of which rendering method is preferred - note that '3d' rendering can have unintended clipping effects on content in the grid.",
"optional":true,
"default":"2d",
"options":["2d", "3d"]
},
{
"name":"index",
"type":"Integer",
"description":"The current first item index at the top of the grid",
"default":"",
"options":[]
"description":"The current first visible item's index at the top of the grid.",
"default":""
}
],
"methods": [
{
"name":"setAllSelections",
"description":"Sets all of the grid's items to be selected or deselected according to the provided parameter.",
"arguments":[
{
"name":"checked",
"type":"Boolean",
"optional":false,
"default":"undefined",
"description":"true selects all items and false deselects all items."
}
]
},
{
"name":"setAllExpansions",
"description":"Sets all of the grid's items to be expanded or collapsed according to the provided parameter.",
"arguments":[
{
"name":"expanded",
"type":"Boolean",
"optional":false,
"default":"undefined",
"description":"true expands all items and false collapses all items."
}
]
},
{
"name":"sortBy",
"description":"Indicates which field/column should be sorted, and in which direction. Invoking this method does not actually perform any sorting operations on the data, it does however fire events so that listeners may do so.",
"arguments":[
{
"name":"field",
"type":"String",
"optional":false,
"default":"undefined",
"description":"The name of the field on the column chosen for sorting."
},
{
"name":"order",
"type":"String",
"optional":false,
"default":"undefined",
"description":"The direction in which the data should be sorted.",
"options": ["1 (ascending)", "-1 (descending)", "0 (no sorting)"]
}
]
},
{
"name":"requestInitialization",
"description":"Under especially unusual circumstances, the grid may not initialize (nor render) properly. This method can be invoked to correct any such issue. Generally, developers should never need to call this method - however, it should be idempotent (and thus safe to call multiple times successively).",
"arguments":[]
}
],
"methods": [],
"events": [],
"articles": ["grid_intro", "grid_config", "grid_data_integration"]
}

0 comments on commit deb6b4b

Please sign in to comment.