diff --git a/docs/api.js b/docs/api.js deleted file mode 100644 index 8b7efa7ac..000000000 --- a/docs/api.js +++ /dev/null @@ -1,12 +0,0 @@ -YUI.add("yuidoc-meta", function(Y) { - Y.YUIDoc = { meta: { - "classes": [ - "Collision", - "Coords", - "Draggable", - "Gridster" - ], - "modules": [], - "allModules": [] -} }; -}); \ No newline at end of file diff --git a/docs/assets/css/external-small.png b/docs/assets/css/external-small.png deleted file mode 100644 index 759a1cdcb..000000000 Binary files a/docs/assets/css/external-small.png and /dev/null differ diff --git a/docs/assets/css/logo.png b/docs/assets/css/logo.png deleted file mode 100644 index 609b336c7..000000000 Binary files a/docs/assets/css/logo.png and /dev/null differ diff --git a/docs/assets/css/main.css b/docs/assets/css/main.css deleted file mode 100644 index f8f7ee711..000000000 --- a/docs/assets/css/main.css +++ /dev/null @@ -1,782 +0,0 @@ -/* -Font sizes for all selectors other than the body are given in percentages, -with 100% equal to 13px. To calculate a font size percentage, multiply the -desired size in pixels by 7.6923076923. - -Here's a quick lookup table: - -10px - 76.923% -11px - 84.615% -12px - 92.308% -13px - 100% -14px - 107.692% -15px - 115.385% -16px - 123.077% -17px - 130.769% -18px - 138.462% -19px - 146.154% -20px - 153.846% -*/ - -html { - background: #fff; - color: #333; - overflow-y: scroll; -} - -body { - font: 13px/1.4 'Lucida Grande', 'Lucida Sans Unicode', 'DejaVu Sans', 'Bitstream Vera Sans', 'Helvetica', 'Arial', sans-serif; - margin: 0; - padding: 0; -} - -/* -- Links ----------------------------------------------------------------- */ -a { - color: #356de4; - text-decoration: none; -} - -.hidden { - display: none; -} - -a:hover { text-decoration: underline; } - -/* "Jump to Table of Contents" link is shown to assistive tools, but hidden from - sight until it's focused. */ -.jump { - position: absolute; - padding: 3px 6px; - left: -99999px; - top: 0; -} - -.jump:focus { left: 40%; } - -/* -- Paragraphs ------------------------------------------------------------ */ -p { margin: 1.3em 0; } -dd p, td p { margin-bottom: 0; } -dd p:first-child, td p:first-child { margin-top: 0; } - -/* -- Headings -------------------------------------------------------------- */ -h1, h2, h3, h4, h5, h6 { - color: #D98527;/*was #f80*/ - font-family: 'Trebuchet MS', sans-serif; - font-weight: bold; - line-height: 1.1; - margin: 1.1em 0 0.5em; -} - -h1 { - font-size: 184.6%; - color: #30418C; - margin: 0.75em 0 0.5em; -} - -h2 { - font-size: 153.846%; - color: #E48A2B; -} - -h3 { font-size: 138.462%; } - -h4 { - border-bottom: 1px solid #DBDFEA; - color: #E48A2B; - font-size: 115.385%; - font-weight: normal; - padding-bottom: 2px; -} - -h5, h6 { font-size: 107.692%; } - -/* -- Code and examples ----------------------------------------------------- */ -code, kbd, pre, samp { - font-family: Menlo, Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; - font-size: 92.308%; - line-height: 1.35; -} - -p code, p kbd, p samp { - background: #FCFBFA; - border: 1px solid #EFEEED; - padding: 0 3px; -} - -a code, a kbd, a samp, -pre code, pre kbd, pre samp, -table code, table kbd, table samp, -.intro code, .intro kbd, .intro samp, -.toc code, .toc kbd, .toc samp { - background: none; - border: none; - padding: 0; -} - -pre.code, pre.terminal, pre.cmd { - overflow-x: auto; - *overflow-x: scroll; - padding: 0.3em 0.6em; -} - -pre.code { - background: #FCFBFA; - border: 1px solid #EFEEED; - border-left-width: 5px; -} - -pre.terminal, pre.cmd { - background: #F0EFFC; - border: 1px solid #D0CBFB; - border-left: 5px solid #D0CBFB; -} - -/* Don't reduce the font size of // elements inside
-   blocks. */
-pre code, pre kbd, pre samp { font-size: 100%; }
-
-/* Used to denote text that shouldn't be selectable, such as line numbers or
-   shell prompts. Guess which browser this doesn't work in. */
-.noselect {
-    -moz-user-select: -moz-none;
-    -khtml-user-select: none;
-    -webkit-user-select: none;
-    -o-user-select: none;
-    user-select: none;
-}
-
-/* -- Lists ----------------------------------------------------------------- */
-dd { margin: 0.2em 0 0.7em 1em; }
-dl { margin: 1em 0; }
-dt { font-weight: bold; }
-
-/* -- Tables ---------------------------------------------------------------- */
-caption, th { text-align: left; }
-
-table {
-    border-collapse: collapse;
-    width: 100%;
-}
-
-td, th {
-    border: 1px solid #fff;
-    padding: 5px 12px;
-    vertical-align: top;
-}
-
-td { background: #E6E9F5; }
-td dl { margin: 0; }
-td dl dl { margin: 1em 0; }
-td pre:first-child { margin-top: 0; }
-
-th {
-    background: #D2D7E6;/*#97A0BF*/
-    border-bottom: none;
-    border-top: none;
-    color: #000;/*#FFF1D5*/
-    font-family: 'Trebuchet MS', sans-serif;
-    font-weight: bold;
-    line-height: 1.3;
-    white-space: nowrap;
-}
-
-
-/* -- Layout and Content ---------------------------------------------------- */
-#doc {
-    margin: auto;
-    min-width: 1024px;
-}
-
-.content { padding: 0 20px 0 25px; }
-
-.sidebar {
-    padding: 0 15px 0 10px;
-}
-#bd {
-    padding: 7px 0 130px;
-    position: relative;
-    width: 99%;
-}
-
-/* -- Table of Contents ----------------------------------------------------- */
-
-/* The #toc id refers to the single global table of contents, while the .toc
-   class refers to generic TOC lists that could be used throughout the page. */
-
-.toc code, .toc kbd, .toc samp { font-size: 100%; }
-.toc li { font-weight: bold; }
-.toc li li { font-weight: normal; }
-
-/* -- Intro and Example Boxes ----------------------------------------------- */
-/*
-.intro, .example { margin-bottom: 2em; }
-.example {
-    -moz-border-radius: 4px;
-    -webkit-border-radius: 4px;
-    border-radius: 4px;
-    -moz-box-shadow: 0 0 5px #bfbfbf;
-    -webkit-box-shadow: 0 0 5px #bfbfbf;
-    box-shadow: 0 0 5px #bfbfbf;
-    padding: 1em;
-}
-.intro {
-    background: none repeat scroll 0 0 #F0F1F8; border: 1px solid #D4D8EB; padding: 0 1em;
-}
-*/
-
-/* -- Other Styles ---------------------------------------------------------- */
-
-/* These are probably YUI-specific, and should be moved out of Selleck's default
-   theme. */
-
-.button {
-    border: 1px solid #dadada;
-    -moz-border-radius: 3px;
-    -webkit-border-radius: 3px;
-    border-radius: 3px;
-    color: #444;
-    display: inline-block;
-    font-family: Helvetica, Arial, sans-serif;
-    font-size: 92.308%;
-    font-weight: bold;
-    padding: 4px 13px 3px;
-    -moz-text-shadow: 1px 1px 0 #fff;
-    -webkit-text-shadow: 1px 1px 0 #fff;
-    text-shadow: 1px 1px 0 #fff;
-    white-space: nowrap;
-
-    background: #EFEFEF; /* old browsers */
-    background: -moz-linear-gradient(top, #f5f5f5 0%, #efefef 50%, #e5e5e5 51%, #dfdfdf 100%); /* firefox */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(50%,#efefef), color-stop(51%,#e5e5e5), color-stop(100%,#dfdfdf)); /* webkit */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dfdfdf',GradientType=0 ); /* ie */
-}
-
-.button:hover {
-    border-color: #466899;
-    color: #fff;
-    text-decoration: none;
-    -moz-text-shadow: 1px 1px 0 #222;
-    -webkit-text-shadow: 1px 1px 0 #222;
-    text-shadow: 1px 1px 0 #222;
-
-    background: #6396D8; /* old browsers */
-    background: -moz-linear-gradient(top, #6396D8 0%, #5A83BC 50%, #547AB7 51%, #466899 100%); /* firefox */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6396D8), color-stop(50%,#5A83BC), color-stop(51%,#547AB7), color-stop(100%,#466899)); /* webkit */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6396D8', endColorstr='#466899',GradientType=0 ); /* ie */
-}
-
-.newwindow { text-align: center; }
-
-.header .version em {
-    display: block;
-    text-align: right;
-}
-
-
-#classdocs .item {
-    border-bottom: 1px solid #466899;
-    margin: 1em 0;
-    padding: 1.5em;
-}
-
-#classdocs .item .params p,
-    #classdocs .item .returns p,{
-    display: inline;
-}
-
-#classdocs .item em code, #classdocs .item em.comment {
-    color: green;
-}
-
-#classdocs .item em.comment a {
-    color: green;
-    text-decoration: underline;
-}
-
-#classdocs .foundat {
-    font-size: 11px;
-    font-style: normal;
-}
-
-.attrs .emits {
-    margin-left: 2em;
-    padding: .5em;
-    border-left: 1px dashed #ccc;
-}
-
-abbr {
-    border-bottom: 1px dashed #ccc;
-    font-size: 80%;
-    cursor: help;
-}
-
-.prettyprint li.L0, 
-.prettyprint li.L1, 
-.prettyprint li.L2, 
-.prettyprint li.L3, 
-.prettyprint li.L5, 
-.prettyprint li.L6, 
-.prettyprint li.L7, 
-.prettyprint li.L8 {
-    list-style: decimal;
-}
-
-ul li p {
-    margin-top: 0;
-}
-
-.method .name {
-    font-size: 110%;
-}
-
-.apidocs .methods .extends .method,
-.apidocs .properties .extends .property,
-.apidocs .attrs .extends .attr,
-.apidocs .events .extends .event {
-    font-weight: bold;
-}
-
-.apidocs .methods .extends .inherited,
-.apidocs .properties .extends .inherited,
-.apidocs .attrs .extends .inherited,
-.apidocs .events .extends .inherited {
-    font-weight: normal;
-}
-
-#hd {
-    background: whiteSmoke;
-    background: -moz-linear-gradient(top,#DCDBD9 0,#F6F5F3 100%);
-    background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#DCDBD9),color-stop(100%,#F6F5F3));
-    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdbd9',endColorstr='#F6F5F3',GradientType=0);
-    border-bottom: 1px solid #DFDFDF;
-    padding: 0 15px 1px 20px;
-    margin-bottom: 15px;
-}
-
-#hd img {
-    margin-right: 10px;
-    vertical-align: middle;
-}
-
-
-/* -- API Docs CSS ---------------------------------------------------------- */
-
-/*
-This file is organized so that more generic styles are nearer the top, and more
-specific styles are nearer the bottom of the file. This allows us to take full
-advantage of the cascade to avoid redundant style rules. Please respect this
-convention when making changes.
-*/
-
-/* -- Generic TabView styles ------------------------------------------------ */
-
-/*
-These styles apply to all API doc tabviews. To change styles only for a
-specific tabview, see the other sections below.
-*/
-
-.yui3-js-enabled .apidocs .tabview {
-    visibility: hidden; /* Hide until the TabView finishes rendering. */
-    _visibility: visible;
-}
-
-.apidocs .tabview.yui3-tabview-content { visibility: visible; }
-.apidocs .tabview .yui3-tabview-panel { background: #fff; }
-
-/* -- Generic Content Styles ------------------------------------------------ */
-
-/* Headings */
-h2, h3, h4, h5, h6 {
-    border: none;
-    color: #30418C;
-    font-weight: bold;
-    text-decoration: none;
-}
-
-.link-docs {
-    float: right;
-    font-size: 15px;
-    margin: 4px 4px 6px;
-    padding: 6px 30px 5px;
-}
-
-.apidocs { zoom: 1; }
-
-/* Generic box styles. */
-.apidocs .box {
-    border: 1px solid;
-    border-radius: 3px;
-    margin: 1em 0;
-    padding: 0 1em;
-}
-
-/* A flag is a compact, capsule-like indicator of some kind. It's used to
-   indicate private and protected items, item return types, etc. in an
-   attractive and unobtrusive way. */
-.apidocs .flag {
-    background: #bababa;
-    border-radius: 3px;
-    color: #fff;
-    font-size: 11px;
-    margin: 0 0.5em;
-    padding: 2px 4px 1px;
-}
-
-/* Class/module metadata such as "Uses", "Extends", "Defined in", etc. */
-.apidocs .meta {
-    background: #f9f9f9;
-    border-color: #efefef;
-    color: #555;
-    font-size: 11px;
-    padding: 3px 6px;
-}
-
-.apidocs .meta p { margin: 0; }
-
-/* Deprecation warning. */
-.apidocs .box.deprecated,
-.apidocs .flag.deprecated {
-    background: #fdac9f;
-    border: 1px solid #fd7775;
-}
-
-.apidocs .box.deprecated p { margin: 0.5em 0; }
-.apidocs .flag.deprecated { color: #333; }
-
-/* Module/Class intro description. */
-.apidocs .intro {
-    background: #f0f1f8;
-    border-color: #d4d8eb;
-}
-
-/* Loading spinners. */
-#bd.loading .apidocs,
-#api-list.loading .yui3-tabview-panel {
-    background: #fff url(../img/spinner.gif) no-repeat center 70px;
-    min-height: 150px;
-}
-
-#bd.loading .apidocs .content,
-#api-list.loading .yui3-tabview-panel .apis {
-    display: none;
-}
-
-.apidocs .no-visible-items { color: #666; }
-
-/* Generic inline list. */
-.apidocs ul.inline {
-    display: inline;
-    list-style: none;
-    margin: 0;
-    padding: 0;
-}
-
-.apidocs ul.inline li { display: inline; }
-
-/* Comma-separated list. */
-.apidocs ul.commas li:after { content: ','; }
-.apidocs ul.commas li:last-child:after { content: ''; }
-
-/* Keyboard shortcuts. */
-kbd .cmd { font-family: Monaco, Helvetica; }
-
-/* -- Generic Access Level styles ------------------------------------------- */
-.apidocs .item.protected,
-.apidocs .item.private,
-.apidocs .index-item.protected,
-.apidocs .index-item.deprecated,
-.apidocs .index-item.private {
-    display: none;
-}
-
-.show-deprecated .item.deprecated,
-.show-deprecated .index-item.deprecated,
-.show-protected .item.protected,
-.show-protected .index-item.protected,
-.show-private .item.private,
-.show-private .index-item.private {
-    display: block;
-}
-
-.hide-inherited .item.inherited,
-.hide-inherited .index-item.inherited {
-    display: none;
-}
-
-/* -- Generic Item Index styles --------------------------------------------- */
-.apidocs .index { margin: 1.5em 0 3em; }
-
-.apidocs .index h3 {
-    border-bottom: 1px solid #efefef;
-    color: #333;
-    font-size: 13px;
-    margin: 2em 0 0.6em;
-    padding-bottom: 2px;
-}
-
-.apidocs .index .no-visible-items { margin-top: 2em; }
-
-.apidocs .index-list {
-    border-color: #efefef;
-    font-size: 12px;
-    list-style: none;
-    margin: 0;
-    padding: 0;
-    -moz-column-count: 4;
-    -moz-column-gap: 10px;
-    -moz-column-width: 170px;
-    -ms-column-count: 4;
-    -ms-column-gap: 10px;
-    -ms-column-width: 170px;
-    -o-column-count: 4;
-    -o-column-gap: 10px;
-    -o-column-width: 170px;
-    -webkit-column-count: 4;
-    -webkit-column-gap: 10px;
-    -webkit-column-width: 170px;
-    column-count: 4;
-    column-gap: 10px;
-    column-width: 170px;
-}
-
-.apidocs .no-columns .index-list {
-    -moz-column-count: 1;
-    -ms-column-count: 1;
-    -o-column-count: 1;
-    -webkit-column-count: 1;
-    column-count: 1;
-}
-
-.apidocs .index-item { white-space: nowrap; }
-
-.apidocs .index-item .flag {
-    background: none;
-    border: none;
-    color: #afafaf;
-    display: inline;
-    margin: 0 0 0 0.2em;
-    padding: 0;
-}
-
-/* -- Generic API item styles ----------------------------------------------- */
-.apidocs .args {
-    display: inline;
-    margin: 0 0.5em;
-}
-
-.apidocs .flag.chainable { background: #46ca3b; }
-.apidocs .flag.protected { background: #9b86fc; }
-.apidocs .flag.private { background: #fd6b1b; }
-.apidocs .flag.async { background: #356de4; }
-.apidocs .flag.required { background: #e60923; }
-
-.apidocs .item {
-    border-bottom: 1px solid #efefef;
-    margin: 1.5em 0 2em;
-    padding-bottom: 2em;
-}
-
-.apidocs .item h4,
-.apidocs .item h5,
-.apidocs .item h6 {
-    color: #333;
-    font-family: inherit;
-    font-size: 100%;
-}
-
-.apidocs .item .description p,
-.apidocs .item pre.code {
-    margin: 1em 0 0;
-}
-
-.apidocs .item .meta {
-    background: none;
-    border: none;
-    padding: 0;
-}
-
-.apidocs .item .name {
-    display: inline;
-    font-size: 14px;
-}
-
-.apidocs .item .type,
-.apidocs .item .type a,
-.apidocs .returns-inline {
-    color: #555;
-}
-
-.apidocs .item .type,
-.apidocs .returns-inline {
-    font-size: 11px;
-    margin: 0 0 0 0;
-}
-
-.apidocs .item .type a { border-bottom: 1px dotted #afafaf; }
-.apidocs .item .type a:hover { border: none; }
-
-/* -- Item Parameter List --------------------------------------------------- */
-.apidocs .params-list {
-    list-style: square;
-    margin: 1em 0 0 2em;
-    padding: 0;
-}
-
-.apidocs .param { margin-bottom: 1em; }
-
-.apidocs .param .type,
-.apidocs .param .type a {
-    color: #666;
-}
-
-.apidocs .param .type {
-    margin: 0 0 0 0.5em;
-    *margin-left: 0.5em;
-}
-
-.apidocs .param-name { font-weight: bold; }
-
-/* -- Item "Emits" block ---------------------------------------------------- */
-.apidocs .item .emits {
-    background: #f9f9f9;
-    border-color: #eaeaea;
-}
-
-/* -- Item "Returns" block -------------------------------------------------- */
-.apidocs .item .returns .type,
-.apidocs .item .returns .type a {
-    font-size: 100%;
-    margin: 0;
-}
-
-/* -- Class Constructor block ----------------------------------------------- */
-.apidocs .constructor .item {
-    border: none;
-    padding-bottom: 0;
-}
-
-/* -- File Source View ------------------------------------------------------ */
-.apidocs .file pre.code,
-#doc .apidocs .file pre.prettyprint {
-    background: inherit;
-    border: none;
-    overflow: visible;
-    padding: 0;
-}
-
-.apidocs .L0,
-.apidocs .L1,
-.apidocs .L2,
-.apidocs .L3,
-.apidocs .L4,
-.apidocs .L5,
-.apidocs .L6,
-.apidocs .L7,
-.apidocs .L8,
-.apidocs .L9 {
-    background: inherit;
-}
-
-/* -- Submodule List -------------------------------------------------------- */
-.apidocs .module-submodule-description {
-    font-size: 12px;
-    margin: 0.3em 0 1em;
-}
-
-.apidocs .module-submodule-description p:first-child { margin-top: 0; }
-
-/* -- Sidebar TabView ------------------------------------------------------- */
-#api-tabview { margin-top: 0.6em; }
-
-#api-tabview-filter,
-#api-tabview-panel {
-    border: 1px solid #dfdfdf;
-}
-
-#api-tabview-filter {
-    border-bottom: none;
-    border-top: none;
-    padding: 0.6em 10px 0 10px;
-}
-
-#api-tabview-panel { border-top: none; }
-#api-filter { width: 97%; }
-
-/* -- Content TabView ------------------------------------------------------- */
-#classdocs .yui3-tabview-panel { border: none; }
-
-/* -- Source File Contents -------------------------------------------------- */
-.prettyprint li.L0,
-.prettyprint li.L1,
-.prettyprint li.L2,
-.prettyprint li.L3,
-.prettyprint li.L5,
-.prettyprint li.L6,
-.prettyprint li.L7,
-.prettyprint li.L8 {
-    list-style: decimal;
-}
-
-/* -- API options ----------------------------------------------------------- */
-#api-options {
-    font-size: 11px;
-    margin-top: 2.2em;
-    position: absolute;
-    right: 1.5em;
-}
-
-/*#api-options label { margin-right: 0.6em; }*/
-
-/* -- API list -------------------------------------------------------------- */
-#api-list {
-    margin-top: 1.5em;
-    *zoom: 1;
-}
-
-.apis {
-    font-size: 12px;
-    line-height: 1.4;
-    list-style: none;
-    margin: 0;
-    padding: 0.5em 0 0.5em 0.4em;
-}
-
-.apis a {
-    border: 1px solid transparent;
-    display: block;
-    margin: 0 0 0 -4px;
-    padding: 1px 4px 0;
-    text-decoration: none;
-    _border: none;
-    _display: inline;
-}
-
-.apis a:hover,
-.apis a:focus {
-    background: #E8EDFC;
-    background: -moz-linear-gradient(top, #e8edfc 0%, #becef7 100%);
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#E8EDFC), color-stop(100%,#BECEF7));
-    border-color: #AAC0FA;
-    border-radius: 3px;
-    color: #333;
-    outline: none;
-}
-
-.api-list-item a:hover,
-.api-list-item a:focus {
-    font-weight: bold;
-    text-shadow: 1px 1px 1px #fff;
-}
-
-.apis .message { color: #888; }
-.apis .result a { padding: 3px 5px 2px; }
-
-.apis .result .type {
-    right: 4px;
-    top: 7px;
-}
-
-.api-list-item .yui3-highlight {
-    font-weight: bold;
-}
-
diff --git a/docs/assets/favicon.png b/docs/assets/favicon.png
deleted file mode 100644
index 5a95ddab6..000000000
Binary files a/docs/assets/favicon.png and /dev/null differ
diff --git a/docs/assets/img/spinner.gif b/docs/assets/img/spinner.gif
deleted file mode 100644
index 44f96ba68..000000000
Binary files a/docs/assets/img/spinner.gif and /dev/null differ
diff --git a/docs/assets/index.html b/docs/assets/index.html
deleted file mode 100644
index 487fe15b2..000000000
--- a/docs/assets/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-    
-        Redirector
-        
-    
-    
-        Click here to redirect
-    
-
diff --git a/docs/assets/js/api-filter.js b/docs/assets/js/api-filter.js
deleted file mode 100644
index 37aefbab9..000000000
--- a/docs/assets/js/api-filter.js
+++ /dev/null
@@ -1,52 +0,0 @@
-YUI.add('api-filter', function (Y) {
-
-Y.APIFilter = Y.Base.create('apiFilter', Y.Base, [Y.AutoCompleteBase], {
-    // -- Initializer ----------------------------------------------------------
-    initializer: function () {
-        this._bindUIACBase();
-        this._syncUIACBase();
-    },
-    getDisplayName: function(name) {
-
-        Y.each(Y.YUIDoc.meta.allModules, function(i) {
-            if (i.name === name && i.displayName) {
-                name = i.displayName;
-            }
-        });
-
-        return name;
-    }
-
-}, {
-    // -- Attributes -----------------------------------------------------------
-    ATTRS: {
-        resultHighlighter: {
-            value: 'phraseMatch'
-        },
-
-        // May be set to "classes" or "modules".
-        queryType: {
-            value: 'classes'
-        },
-
-        source: {
-            valueFn: function() {
-                var self = this;
-                return function(q) {
-                    var data = Y.YUIDoc.meta[self.get('queryType')],
-                        out = [];
-                    Y.each(data, function(v) {
-                        if (v.toLowerCase().indexOf(q.toLowerCase()) > -1) {
-                            out.push(v);
-                        }
-                    });
-                    return out;
-                };
-            }
-        }
-    }
-});
-
-}, '3.4.0', {requires: [
-    'autocomplete-base', 'autocomplete-highlighters', 'autocomplete-sources'
-]});
diff --git a/docs/assets/js/api-list.js b/docs/assets/js/api-list.js
deleted file mode 100644
index 88905b52e..000000000
--- a/docs/assets/js/api-list.js
+++ /dev/null
@@ -1,251 +0,0 @@
-YUI.add('api-list', function (Y) {
-
-var Lang   = Y.Lang,
-    YArray = Y.Array,
-
-    APIList = Y.namespace('APIList'),
-
-    classesNode    = Y.one('#api-classes'),
-    inputNode      = Y.one('#api-filter'),
-    modulesNode    = Y.one('#api-modules'),
-    tabviewNode    = Y.one('#api-tabview'),
-
-    tabs = APIList.tabs = {},
-
-    filter = APIList.filter = new Y.APIFilter({
-        inputNode : inputNode,
-        maxResults: 1000,
-
-        on: {
-            results: onFilterResults
-        }
-    }),
-
-    search = APIList.search = new Y.APISearch({
-        inputNode : inputNode,
-        maxResults: 100,
-
-        on: {
-            clear  : onSearchClear,
-            results: onSearchResults
-        }
-    }),
-
-    tabview = APIList.tabview = new Y.TabView({
-        srcNode  : tabviewNode,
-        panelNode: '#api-tabview-panel',
-        render   : true,
-
-        on: {
-            selectionChange: onTabSelectionChange
-        }
-    }),
-
-    focusManager = APIList.focusManager = tabviewNode.plug(Y.Plugin.NodeFocusManager, {
-        circular   : true,
-        descendants: '#api-filter, .yui3-tab-panel-selected .api-list-item a, .yui3-tab-panel-selected .result a',
-        keys       : {next: 'down:40', previous: 'down:38'}
-    }).focusManager,
-
-    LIST_ITEM_TEMPLATE =
-        '
  • ' + - '{displayName}' + - '
  • '; - -// -- Init --------------------------------------------------------------------- - -// Duckpunch FocusManager's key event handling to prevent it from handling key -// events when a modifier is pressed. -Y.before(function (e, activeDescendant) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { - return new Y.Do.Prevent(); - } -}, focusManager, '_focusPrevious', focusManager); - -Y.before(function (e, activeDescendant) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { - return new Y.Do.Prevent(); - } -}, focusManager, '_focusNext', focusManager); - -// Create a mapping of tabs in the tabview so we can refer to them easily later. -tabview.each(function (tab, index) { - var name = tab.get('label').toLowerCase(); - - tabs[name] = { - index: index, - name : name, - tab : tab - }; -}); - -// Switch tabs on Ctrl/Cmd-Left/Right arrows. -tabviewNode.on('key', onTabSwitchKey, 'down:37,39'); - -// Focus the filter input when the `/` key is pressed. -Y.one(Y.config.doc).on('key', onSearchKey, 'down:83'); - -// Keep the Focus Manager up to date. -inputNode.on('focus', function () { - focusManager.set('activeDescendant', inputNode); -}); - -// Update all tabview links to resolved URLs. -tabview.get('panelNode').all('a').each(function (link) { - link.setAttribute('href', link.get('href')); -}); - -// -- Private Functions -------------------------------------------------------- -function getFilterResultNode() { - return filter.get('queryType') === 'classes' ? classesNode : modulesNode; -} - -// -- Event Handlers ----------------------------------------------------------- -function onFilterResults(e) { - var frag = Y.one(Y.config.doc.createDocumentFragment()), - resultNode = getFilterResultNode(), - typePlural = filter.get('queryType'), - typeSingular = typePlural === 'classes' ? 'class' : 'module'; - - if (e.results.length) { - YArray.each(e.results, function (result) { - frag.append(Lang.sub(LIST_ITEM_TEMPLATE, { - rootPath : APIList.rootPath, - displayName : filter.getDisplayName(result.highlighted), - name : result.text, - typePlural : typePlural, - typeSingular: typeSingular - })); - }); - } else { - frag.append( - '
  • ' + - 'No ' + typePlural + ' found.' + - '
  • ' - ); - } - - resultNode.empty(true); - resultNode.append(frag); - - focusManager.refresh(); -} - -function onSearchClear(e) { - - focusManager.refresh(); -} - -function onSearchKey(e) { - var target = e.target; - - if (target.test('input,select,textarea') - || target.get('isContentEditable')) { - return; - } - - e.preventDefault(); - - inputNode.focus(); - focusManager.refresh(); -} - -function onSearchResults(e) { - var frag = Y.one(Y.config.doc.createDocumentFragment()); - - if (e.results.length) { - YArray.each(e.results, function (result) { - frag.append(result.display); - }); - } else { - frag.append( - '
  • ' + - 'No results found. Maybe you\'ll have better luck with a ' + - 'different query?' + - '
  • ' - ); - } - - - focusManager.refresh(); -} - -function onTabSelectionChange(e) { - var tab = e.newVal, - name = tab.get('label').toLowerCase(); - - tabs.selected = { - index: tab.get('index'), - name : name, - tab : tab - }; - - switch (name) { - case 'classes': // fallthru - case 'modules': - filter.setAttrs({ - minQueryLength: 0, - queryType : name - }); - - search.set('minQueryLength', -1); - - // Only send a request if this isn't the initially-selected tab. - if (e.prevVal) { - filter.sendRequest(filter.get('value')); - } - break; - - case 'everything': - filter.set('minQueryLength', -1); - search.set('minQueryLength', 1); - - if (search.get('value')) { - search.sendRequest(search.get('value')); - } else { - inputNode.focus(); - } - break; - - default: - // WTF? We shouldn't be here! - filter.set('minQueryLength', -1); - search.set('minQueryLength', -1); - } - - if (focusManager) { - setTimeout(function () { - focusManager.refresh(); - }, 1); - } -} - -function onTabSwitchKey(e) { - var currentTabIndex = tabs.selected.index; - - if (!(e.ctrlKey || e.metaKey)) { - return; - } - - e.preventDefault(); - - switch (e.keyCode) { - case 37: // left arrow - if (currentTabIndex > 0) { - tabview.selectChild(currentTabIndex - 1); - inputNode.focus(); - } - break; - - case 39: // right arrow - if (currentTabIndex < (Y.Object.size(tabs) - 2)) { - tabview.selectChild(currentTabIndex + 1); - inputNode.focus(); - } - break; - } -} - -}, '3.4.0', {requires: [ - 'api-filter', 'api-search', 'event-key', 'node-focusmanager', 'tabview' -]}); diff --git a/docs/assets/js/api-search.js b/docs/assets/js/api-search.js deleted file mode 100644 index 175f6a617..000000000 --- a/docs/assets/js/api-search.js +++ /dev/null @@ -1,98 +0,0 @@ -YUI.add('api-search', function (Y) { - -var Lang = Y.Lang, - Node = Y.Node, - YArray = Y.Array; - -Y.APISearch = Y.Base.create('apiSearch', Y.Base, [Y.AutoCompleteBase], { - // -- Public Properties ---------------------------------------------------- - RESULT_TEMPLATE: - '
  • ' + - '' + - '

    {name}

    ' + - '{resultType}' + - '
    {description}
    ' + - '{class}' + - '
    ' + - '
  • ', - - // -- Initializer ---------------------------------------------------------- - initializer: function () { - this._bindUIACBase(); - this._syncUIACBase(); - }, - - // -- Protected Methods ---------------------------------------------------- - _apiResultFilter: function (query, results) { - // Filter components out of the results. - return YArray.filter(results, function (result) { - return result.raw.resultType === 'component' ? false : result; - }); - }, - - _apiResultFormatter: function (query, results) { - return YArray.map(results, function (result) { - var raw = Y.merge(result.raw), // create a copy - desc = raw.description || ''; - - // Convert description to text and truncate it if necessary. - desc = Node.create('
    ' + desc + '
    ').get('text'); - - if (desc.length > 65) { - desc = Y.Escape.html(desc.substr(0, 65)) + ' …'; - } else { - desc = Y.Escape.html(desc); - } - - raw['class'] || (raw['class'] = ''); - raw.description = desc; - - // Use the highlighted result name. - raw.name = result.highlighted; - - return Lang.sub(this.RESULT_TEMPLATE, raw); - }, this); - }, - - _apiTextLocator: function (result) { - return result.displayName || result.name; - } -}, { - // -- Attributes ----------------------------------------------------------- - ATTRS: { - resultFormatter: { - valueFn: function () { - return this._apiResultFormatter; - } - }, - - resultFilters: { - valueFn: function () { - return this._apiResultFilter; - } - }, - - resultHighlighter: { - value: 'phraseMatch' - }, - - resultListLocator: { - value: 'data.results' - }, - - resultTextLocator: { - valueFn: function () { - return this._apiTextLocator; - } - }, - - source: { - value: '/api/v1/search?q={query}&count={maxResults}' - } - } -}); - -}, '3.4.0', {requires: [ - 'autocomplete-base', 'autocomplete-highlighters', 'autocomplete-sources', - 'escape' -]}); diff --git a/docs/assets/js/apidocs.js b/docs/assets/js/apidocs.js deleted file mode 100644 index fc0cacc0f..000000000 --- a/docs/assets/js/apidocs.js +++ /dev/null @@ -1,351 +0,0 @@ -YUI().use( - 'yuidoc-meta', - 'api-list', 'history-hash', 'node-screen', 'node-style', 'pjax', -function (Y) { - -var win = Y.config.win, - localStorage = win.localStorage, - - bdNode = Y.one('#bd'), - - pjax, - - classTabView, - selectedTab; - -// Kill pjax functionality unless serving over HTTP. -if (!Y.getLocation().protocol.match(/^https?\:/)) { - Y.Router.html5 = false; -} - -pjax = new Y.Pjax({ - container : '#docs-main', - contentSelector: '#docs-main > .content', - linkSelector : '#bd a', - titleSelector : '#xhr-title', - - navigateOnHash: true, - root : '/', - routes : [ - // -- / ---------------------------------------------------------------- - {path: '/(index.html)?', callback: '_defaultRoute'}, - - // -- /classes/* ------------------------------------------------------- - {path: '/classes/:class.html*', callback: 'handleClasses'}, - {path: '/classes/:class.html*', callback: '_defaultRoute'}, - - // -- /files/* --------------------------------------------------------- - {path: '/files/*file', callback: 'handleFiles'}, - {path: '/files/*file', callback: '_defaultRoute'}, - - // -- /modules/* ------------------------------------------------------- - {path: '/modules/:module.html*', callback: '_defaultRoute'} - ] -}); - -// -- Utility Functions -------------------------------------------------------- - -pjax.checkVisibility = function (tab) { - tab || (tab = selectedTab); - - if (!tab) { return; } - - var panelNode = tab.get('panelNode'), - visibleItems; - - // If no items are visible in the tab panel due to the current visibility - // settings, display a message to that effect. - visibleItems = panelNode.all('.item,.index-item').some(function (itemNode) { - if (itemNode.getComputedStyle('display') !== 'none') { - return true; - } - }); - - panelNode.all('.no-visible-items').remove(); - - if (!visibleItems) { - if (Y.one('#index .index-item')) { - panelNode.append( - '
    ' + - '

    ' + - 'Some items are not shown due to the current visibility ' + - 'settings. Use the checkboxes at the upper right of this ' + - 'page to change the visibility settings.' + - '

    ' + - '
    ' - ); - } else { - panelNode.append( - '
    ' + - '

    ' + - 'This class doesn\'t provide any methods, properties, ' + - 'attributes, or events.' + - '

    ' + - '
    ' - ); - } - } - - // Hide index sections without any visible items. - Y.all('.index-section').each(function (section) { - var items = 0, - visibleItems = 0; - - section.all('.index-item').each(function (itemNode) { - items += 1; - - if (itemNode.getComputedStyle('display') !== 'none') { - visibleItems += 1; - } - }); - - section.toggleClass('hidden', !visibleItems); - section.toggleClass('no-columns', visibleItems < 4); - }); -}; - -pjax.initClassTabView = function () { - if (!Y.all('#classdocs .api-class-tab').size()) { - return; - } - - if (classTabView) { - classTabView.destroy(); - selectedTab = null; - } - - classTabView = new Y.TabView({ - srcNode: '#classdocs', - - on: { - selectionChange: pjax.onTabSelectionChange - } - }); - - pjax.updateTabState(); - classTabView.render(); -}; - -pjax.initLineNumbers = function () { - var hash = win.location.hash.substring(1), - container = pjax.get('container'), - hasLines, node; - - // Add ids for each line number in the file source view. - container.all('.linenums>li').each(function (lineNode, index) { - lineNode.set('id', 'l' + (index + 1)); - lineNode.addClass('file-line'); - hasLines = true; - }); - - // Scroll to the desired line. - if (hasLines && /^l\d+$/.test(hash)) { - if ((node = container.getById(hash))) { - win.scroll(0, node.getY()); - } - } -}; - -pjax.initRoot = function () { - var terminators = /^(?:classes|files|modules)$/, - parts = pjax._getRoot().split('/'), - root = [], - i, len, part; - - for (i = 0, len = parts.length; i < len; i += 1) { - part = parts[i]; - - if (part.match(terminators)) { - // Makes sure the path will end with a "/". - root.push(''); - break; - } - - root.push(part); - } - - pjax.set('root', root.join('/')); -}; - -pjax.updateTabState = function (src) { - var hash = win.location.hash.substring(1), - defaultTab, node, tab, tabPanel; - - function scrollToNode() { - if (node.hasClass('protected')) { - Y.one('#api-show-protected').set('checked', true); - pjax.updateVisibility(); - } - - if (node.hasClass('private')) { - Y.one('#api-show-private').set('checked', true); - pjax.updateVisibility(); - } - - setTimeout(function () { - // For some reason, unless we re-get the node instance here, - // getY() always returns 0. - var node = Y.one('#classdocs').getById(hash); - win.scrollTo(0, node.getY() - 70); - }, 1); - } - - if (!classTabView) { - return; - } - - if (src === 'hashchange' && !hash) { - defaultTab = 'index'; - } else { - if (localStorage) { - defaultTab = localStorage.getItem('tab_' + pjax.getPath()) || - 'index'; - } else { - defaultTab = 'index'; - } - } - - if (hash && (node = Y.one('#classdocs').getById(hash))) { - if ((tabPanel = node.ancestor('.api-class-tabpanel', true))) { - if ((tab = Y.one('#classdocs .api-class-tab.' + tabPanel.get('id')))) { - if (classTabView.get('rendered')) { - Y.Widget.getByNode(tab).set('selected', 1); - } else { - tab.addClass('yui3-tab-selected'); - } - } - } - - // Scroll to the desired element if this is a hash URL. - if (node) { - if (classTabView.get('rendered')) { - scrollToNode(); - } else { - classTabView.once('renderedChange', scrollToNode); - } - } - } else { - tab = Y.one('#classdocs .api-class-tab.' + defaultTab); - - if (classTabView.get('rendered')) { - Y.Widget.getByNode(tab).set('selected', 1); - } else { - tab.addClass('yui3-tab-selected'); - } - } -}; - -pjax.updateVisibility = function () { - var container = pjax.get('container'); - - container.toggleClass('hide-inherited', - !Y.one('#api-show-inherited').get('checked')); - - container.toggleClass('show-deprecated', - Y.one('#api-show-deprecated').get('checked')); - - container.toggleClass('show-protected', - Y.one('#api-show-protected').get('checked')); - - container.toggleClass('show-private', - Y.one('#api-show-private').get('checked')); - - pjax.checkVisibility(); -}; - -// -- Route Handlers ----------------------------------------------------------- - -pjax.handleClasses = function (req, res, next) { - pjax.onceAfter(['error', 'load'], function (e) { - if (e.type === 'pjax:load') { - pjax.initClassTabView(); - } - }); - - next(); -}; - -pjax.handleFiles = function (req, res, next) { - pjax.onceAfter(['error', 'load'], function (e) { - if (e.type === 'pjax:load') { - pjax.initLineNumbers(); - } - }); - - next(); -}; - -// -- Event Handlers ----------------------------------------------------------- - -pjax.afterContent = function (e) { - // Enable syntax highlighting on the loaded content. - prettyPrint(); - - bdNode.removeClass('loading'); -}; - -pjax.onNavigate = function (e) { - var hash = e.hash, - originTarget = e.originEvent && e.originEvent.target, - tab; - - if (hash) { - tab = originTarget && originTarget.ancestor('.yui3-tab', true); - - if (hash === win.location.hash) { - pjax.updateTabState('hashchange'); - } else if (!tab) { - win.location.hash = hash; - } - - e.preventDefault(); - return; - } - - // Only scroll to the top of the page when the URL doesn't have a hash. - this.set('scrollToTop', !e.url.match(/#.+$/)); - - bdNode.addClass('loading'); -}; - -pjax.onOptionClick = function (e) { - pjax.updateVisibility(); -}; - -pjax.onTabSelectionChange = function (e) { - var tab = e.newVal, - tabId = tab.get('contentBox').getAttribute('href').substring(1); - - selectedTab = tab; - - // If switching from a previous tab (i.e., this is not the default tab), - // replace the history entry with a hash URL that will cause this tab to - // be selected if the user navigates away and then returns using the back - // or forward buttons. - if (e.prevVal && localStorage) { - localStorage.setItem('tab_' + pjax.getPath(), tabId); - } - - pjax.checkVisibility(tab); -}; - -// -- Init --------------------------------------------------------------------- - -pjax.on('navigate', pjax.onNavigate); -pjax.after(['error', 'load'], pjax.afterContent); - -pjax.initRoot(); -pjax.initClassTabView(); -pjax.initLineNumbers(); -pjax.updateVisibility(); -pjax.upgrade(); - -Y.APIList.rootPath = pjax.get('root'); - -Y.one('#api-options').delegate('click', pjax.onOptionClick, 'input'); - -Y.on('hashchange', function (e) { - pjax.updateTabState('hashchange'); -}, win); - -}); diff --git a/docs/assets/js/yui-prettify.js b/docs/assets/js/yui-prettify.js deleted file mode 100644 index 18de86495..000000000 --- a/docs/assets/js/yui-prettify.js +++ /dev/null @@ -1,17 +0,0 @@ -YUI().use('node', function(Y) { - var code = Y.all('.prettyprint.linenums'); - if (code.size()) { - code.each(function(c) { - var lis = c.all('ol li'), - l = 1; - lis.each(function(n) { - n.prepend(''); - l++; - }); - }); - var h = location.hash; - location.hash = ''; - h = h.replace('LINE_', 'LINENUM_'); - location.hash = h; - } -}); diff --git a/docs/assets/vendor/prettify/CHANGES.html b/docs/assets/vendor/prettify/CHANGES.html deleted file mode 100644 index b50b84149..000000000 --- a/docs/assets/vendor/prettify/CHANGES.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - Change Log - - - README - -

    Known Issues

    - - -

    Change Log

    -

    29 March 2007

    - -

    4 Jul 2008

    - -

    5 Jul 2008

    -
    -

    14 Jul 2008

    - -

    6 Jan 2009

    - -

    21 May 2009

    - -

    14 August 2009

    - -

    3 October 2009

    - -

    19 July 2010

    - - - diff --git a/docs/assets/vendor/prettify/COPYING b/docs/assets/vendor/prettify/COPYING deleted file mode 100644 index d64569567..000000000 --- a/docs/assets/vendor/prettify/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/docs/assets/vendor/prettify/README.html b/docs/assets/vendor/prettify/README.html deleted file mode 100644 index c6fe1a32c..000000000 --- a/docs/assets/vendor/prettify/README.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - Javascript code prettifier - - - - - - - - - - Languages : CH -

    Javascript code prettifier

    - -

    Setup

    -
      -
    1. Download a distribution -
    2. Include the script and stylesheets in your document - (you will need to make sure the css and js file are on your server, and - adjust the paths in the script and link tag) -
      -<link href="prettify.css" type="text/css" rel="stylesheet" />
      -<script type="text/javascript" src="prettify.js"></script>
      -
    3. Add onload="prettyPrint()" to your - document's body tag. -
    4. Modify the stylesheet to get the coloring you prefer
    5. -
    - -

    Usage

    -

    Put code snippets in - <pre class="prettyprint">...</pre> - or <code class="prettyprint">...</code> - and it will automatically be pretty printed. - - - - -
    The original - Prettier -
    class Voila {
    -public:
    -  // Voila
    -  static const string VOILA = "Voila";
    -
    -  // will not interfere with embedded tags.
    -}
    - -
    class Voila {
    -public:
    -  // Voila
    -  static const string VOILA = "Voila";
    -
    -  // will not interfere with embedded tags.
    -}
    -
    - -

    FAQ

    -

    Which languages does it work for?

    -

    The comments in prettify.js are authoritative but the lexer - should work on a number of languages including C and friends, - Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. - It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl - and Ruby, but, because of commenting conventions, doesn't work on - Smalltalk, or CAML-like languages.

    - -

    LISPy languages are supported via an extension: - lang-lisp.js.

    -

    And similarly for - CSS, - Haskell, - Lua, - OCAML, SML, F#, - Visual Basic, - SQL, - Protocol Buffers, and - WikiText.. - -

    If you'd like to add an extension for your favorite language, please - look at src/lang-lisp.js and file an - issue including your language extension, and a testcase.

    - -

    How do I specify which language my code is in?

    -

    You don't need to specify the language since prettyprint() - will guess. You can specify a language by specifying the language extension - along with the prettyprint class like so:

    -
    <pre class="prettyprint lang-html">
    -  The lang-* class specifies the language file extensions.
    -  File extensions supported by default include
    -    "bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",
    -    "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
    -    "xhtml", "xml", "xsl".
    -</pre>
    - -

    It doesn't work on <obfuscated code sample>?

    -

    Yes. Prettifying obfuscated code is like putting lipstick on a pig - — i.e. outside the scope of this tool.

    - -

    Which browsers does it work with?

    -

    It's been tested with IE 6, Firefox 1.5 & 2, and Safari 2.0.4. - Look at the test page to see if it - works in your browser.

    - -

    What's changed?

    -

    See the change log

    - -

    Why doesn't Prettyprinting of strings work on WordPress?

    -

    Apparently wordpress does "smart quoting" which changes close quotes. - This causes end quotes to not match up with open quotes. -

    This breaks prettifying as well as copying and pasting of code samples. - See - WordPress's help center for info on how to stop smart quoting of code - snippets.

    - -

    How do I put line numbers in my code?

    -

    You can use the linenums class to turn on line - numbering. If your code doesn't start at line number 1, you can - add a colon and a line number to the end of that class as in - linenums:52. - -

    For example -

    <pre class="prettyprint linenums:4"
    ->// This is line 4.
    -foo();
    -bar();
    -baz();
    -boo();
    -far();
    -faz();
    -<pre>
    - produces -
    // This is line 4.
    -foo();
    -bar();
    -baz();
    -boo();
    -far();
    -faz();
    -
    - -

    How do I prevent a portion of markup from being marked as code?

    -

    You can use the nocode class to identify a span of markup - that is not code. -

    <pre class=prettyprint>
    -int x = foo();  /* This is a comment  <span class="nocode">This is not code</span>
    -  Continuation of comment */
    -int y = bar();
    -</pre>
    -produces -
    -int x = foo();  /* This is a comment  This is not code
    -  Continuation of comment */
    -int y = bar();
    -
    - -

    For a more complete example see the issue22 - testcase.

    - -

    I get an error message "a is not a function" or "opt_whenDone is not a function"

    -

    If you are calling prettyPrint via an event handler, wrap it in a function. - Instead of doing -

    - addEventListener('load', prettyPrint, false); -
    - wrap it in a closure like -
    - addEventListener('load', function (event) { prettyPrint() }, false); -
    - so that the browser does not pass an event object to prettyPrint which - will confuse it. - -


    - - - - diff --git a/docs/assets/vendor/prettify/prettify-min.css b/docs/assets/vendor/prettify/prettify-min.css deleted file mode 100644 index 9b554aac5..000000000 --- a/docs/assets/vendor/prettify/prettify-min.css +++ /dev/null @@ -1 +0,0 @@ -.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun{color:#660}.pln{color:#000}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec{color:#606}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}@media print{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}} \ No newline at end of file diff --git a/docs/assets/vendor/prettify/prettify-min.js b/docs/assets/vendor/prettify/prettify-min.js deleted file mode 100644 index 3dec9931c..000000000 --- a/docs/assets/vendor/prettify/prettify-min.js +++ /dev/null @@ -1,35 +0,0 @@ -window.PR_SHOULD_USE_CONTINUATION=true;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var y=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);y=y?+y[1]:false;window._pr_isIE6=function(){return y};return y}; -(function(){function y(b){return b.replace(L,"&").replace(M,"<").replace(N,">")}function H(b,f,i){switch(b.nodeType){case 1:var o=b.tagName.toLowerCase();f.push("<",o);var l=b.attributes,n=l.length;if(n){if(i){for(var r=[],j=n;--j>=0;)r[j]=l[j];r.sort(function(q,m){return q.name"); -for(l=b.firstChild;l;l=l.nextSibling)H(l,f,i);if(b.firstChild||!/^(?:br|link|img)$/.test(o))f.push("");break;case 3:case 4:f.push(y(b.nodeValue));break}}function O(b){function f(c){if(c.charAt(0)!=="\\")return c.charCodeAt(0);switch(c.charAt(1)){case "b":return 8;case "t":return 9;case "n":return 10;case "v":return 11;case "f":return 12;case "r":return 13;case "u":case "x":return parseInt(c.substring(2),16)||c.charCodeAt(1);case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":return parseInt(c.substring(1), -8);default:return c.charCodeAt(1)}}function i(c){if(c<32)return(c<16?"\\x0":"\\x")+c.toString(16);c=String.fromCharCode(c);if(c==="\\"||c==="-"||c==="["||c==="]")c="\\"+c;return c}function o(c){var d=c.substring(1,c.length-1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));c=[];for(var a=[],k=d[0]==="^",e=k?1:0,h=d.length;e122)){s<65||g>90||a.push([Math.max(65,g)|32,Math.min(s,90)|32]);s<97||g>122||a.push([Math.max(97,g)&-33,Math.min(s,122)&-33])}}a.sort(function(v,w){return v[0]-w[0]||w[1]-v[1]});d=[];g=[NaN,NaN];for(e=0;eh[0]){h[1]+1>h[0]&&a.push("-"); -a.push(i(h[1]))}}a.push("]");return a.join("")}function l(c){for(var d=c.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),a=d.length,k=[],e=0,h=0;e=2&&c==="[")d[e]=o(g);else if(c!=="\\")d[e]=g.replace(/[a-zA-Z]/g,function(s){s=s.charCodeAt(0);return"["+String.fromCharCode(s&-33,s|32)+"]"})}return d.join("")}for(var n=0,r=false,j=false,q=0,m=b.length;q=0;l-=16)o.push(" ".substring(0,l));l=n+1;break;case "\n":f=0;break;default:++f}if(!o)return i;o.push(i.substring(l));return o.join("")}}function I(b, -f,i,o){if(f){b={source:f,c:b};i(b);o.push.apply(o,b.d)}}function B(b,f){var i={},o;(function(){for(var r=b.concat(f),j=[],q={},m=0,t=r.length;m=0;)i[c.charAt(d)]=p;p=p[1];c=""+p;if(!q.hasOwnProperty(c)){j.push(p);q[c]=null}}j.push(/[\0-\uffff]/);o=O(j)})();var l=f.length;function n(r){for(var j=r.c,q=[j,z],m=0,t=r.source.match(o)||[],p={},c=0,d=t.length;c=5&&"lang-"===k.substring(0,5))&&!(e&&typeof e[1]==="string")){h=false;k=P}h||(p[a]=k)}g=m;m+=a.length;if(h){h=e[1];var s=a.indexOf(h),v=s+h.length;if(e[2]){v=a.length-e[2].length;s=v-h.length}k=k.substring(5);I(j+g,a.substring(0,s),n,q);I(j+g+s,h,Q(k,h),q);I(j+g+v,a.substring(v),n,q)}else q.push(j+g,k)}r.d=q}return n}function x(b){var f=[],i=[];if(b.tripleQuotedStrings)f.push([A,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, -null,"'\""]);else b.multiLineStrings?f.push([A,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):f.push([A,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);b.verbatimStrings&&i.push([A,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);if(b.hashComments)if(b.cStyleComments){f.push([C,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]);i.push([A,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, -null])}else f.push([C,/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments){i.push([C,/^\/\/[^\r\n]*/,null]);i.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}b.regexLiterals&&i.push(["lang-regex",RegExp("^"+Z+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);b=b.keywords.replace(/^\s+|\s+$/g,"");b.length&&i.push([R,RegExp("^(?:"+b.replace(/\s+/g,"|")+")\\b"),null]);f.push([z,/^\s+/,null," \r\n\t\u00a0"]);i.push([J,/^@[a-z_$][a-z_$@0-9]*/i,null],[S,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, -null],[z,/^[a-z_$][a-z_$@0-9]*/i,null],[J,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],[E,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]);return B(f,i)}function $(b){function f(D){if(D>r){if(j&&j!==q){n.push("");j=null}if(!j&&q){j=q;n.push('')}var T=y(p(i.substring(r,D))).replace(e?d:c,"$1 ");e=k.test(T);n.push(T.replace(a,s));r=D}}var i=b.source,o=b.g,l=b.d,n=[],r=0,j=null,q=null,m=0,t=0,p=Y(window.PR_TAB_WIDTH),c=/([\r\n ]) /g, -d=/(^| ) /gm,a=/\r\n?|\n/g,k=/[ \r\n]$/,e=true,h=window._pr_isIE6();h=h?b.b.tagName==="PRE"?h===6?" \r\n":h===7?" 
    \r":" \r":" 
    ":"
    ";var g=b.b.className.match(/\blinenums\b(?::(\d+))?/),s;if(g){for(var v=[],w=0;w<10;++w)v[w]=h+'
  • ';var F=g[1]&&g[1].length?g[1]-1:0;n.push('
    1. ");s=function(){var D=v[++F%10];return j?""+D+'':D}}else s=h; -for(;;)if(m");j=null}n.push(o[m+1]);m+=2}else if(t");g&&n.push("
    ");b.a=n.join("")}function u(b,f){for(var i=f.length;--i>=0;){var o=f[i];if(G.hasOwnProperty(o))"console"in window&&console.warn("cannot override language handler %s",o);else G[o]=b}}function Q(b,f){b&&G.hasOwnProperty(b)||(b=/^\s*1&&m.charAt(0)==="<"){if(!ba.test(m))if(ca.test(m)){f.push(m.substring(9,m.length-3));n+=m.length-12}else if(da.test(m)){f.push("\n");++n}else if(m.indexOf(V)>=0&&m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var t=m.match(W)[2],p=1,c;c=j+1;a:for(;c=0;){var e=p.indexOf(";",k);if(e>=0){var h=p.substring(k+3,e),g=10;if(h&&h.charAt(0)==="x"){h=h.substring(1);g=16}var s=parseInt(h,g);isNaN(s)||(p=p.substring(0,k)+String.fromCharCode(s)+p.substring(e+1))}}a=p.replace(ea,"<").replace(fa,">").replace(ga,"'").replace(ha,'"').replace(ia," ").replace(ja, -"&")}f.push(a);n+=a.length}}o={source:f.join(""),h:r};var v=o.source;b.source=v;b.c=0;b.g=o.h;Q(i,v)(b);$(b)}catch(w){if("console"in window)console.log(w&&w.stack?w.stack:w)}}var A="str",R="kwd",C="com",S="typ",J="lit",E="pun",z="pln",P="src",V="nocode",Z=function(){for(var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=", -"~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],f="(?:^^|[+-]",i=0;i:&a-z])/g,"\\$1");f+=")\\s*";return f}(),L=/&/g,M=//g,X=/\"/g,ea=/</g,fa=/>/g,ga=/'/g,ha=/"/g,ja=/&/g,ia=/ /g,ka=/[\r\n]/g,K=null,aa=RegExp("[^<]+| -

    - - -
    - API Docs for: -
    - -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    Collision Class

    -
    - -
    - Uses - -
    - - - - - -
    - Defined in: src/jquery.collision.js:19 -
    - - - - - -
    - - - -
    -

    Detects collisions between a DOM element against other DOM elements or -Coords objects.

    -
    - - -
    -

    Constructor

    -
    -

    Collision

    - - -
    - (
      - -
    • - - el - -
    • - -
    • - - colliders - -
    • - -
    • - - [options] - -
    • - -
    ) -
    - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.collision.js:19 - -

    - - - - - -
    - -
    - -
    - - -
    -

    Parameters:

    - -
      - -
    • - - el - HTMLElement - - - - -
      -

      The jQuery wrapped HTMLElement.

      -
      - - -
    • - -
    • - - colliders - HTMLElement | Array - - - - -
      -

      Can be a jQuery collection - of HTMLElements or an Array of Coords instances.

      -
      - - -
    • - -
    • - - [options] - Object - optional - - - - -
      -

      An Object with all options you want to - overwrite:

      -
      - - -
        - -
      • - - [on_overlap_start] - Function - optional - - -
        -

        Executes a function the first - time each collider is overlapped.

        -
        - - -
      • - -
      • - - [on_overlap_stop] - Function - optional - - -
        -

        Executes a function when a - collider is no longer collided.

        -
        - - -
      • - -
      • - - [on_overlap] - Function - optional - - -
        -

        Executes a function when the -mouse is moved during the collision.

        -
        - - -
      • - -
      - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Object: - - Collision instance. - -
    -
    - - - -
    - -
    - - -
    - - -
    -
    -

    Item Index

    - - - - - - - - -
    - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - diff --git a/docs/classes/Coords.html b/docs/classes/Coords.html deleted file mode 100644 index cfa96b908..000000000 --- a/docs/classes/Coords.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - Coords - - - - - - - - -
    -
    -
    - - -

    - -
    -
    - API Docs for: -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    Coords Class

    -
    - - - - - -
    - Defined in: src/jquery.coords.js:10 -
    - - - - - -
    - - - -
    -

    Creates objects with coordinates (x1, y1, x2, y2, cx, cy, width, height) -to simulate DOM elements on the screen. -Coords is used by Gridster to create a faux grid with any DOM element can -collide.

    -
    - - -
    -

    Constructor

    -
    -

    Coords

    - - -
    - (
      - -
    • - - obj - -
    • - -
    ) -
    - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.coords.js:10 - -

    - - - - - -
    - -
    - -
    - - -
    -

    Parameters:

    - -
      - -
    • - - obj - HTMLElement | Object - - - - -
      -

      The jQuery HTMLElement or a object with: left, -top, width and height properties.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Object: - - Coords instance. - -
    -
    - - - -
    - -
    - - -
    - - -
    -
    -

    Item Index

    - - - - - - - - -
    - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/docs/classes/Draggable.html b/docs/classes/Draggable.html deleted file mode 100644 index 2f5fdcae8..000000000 --- a/docs/classes/Draggable.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - Draggable - - - - - - - - -
    -
    -
    - - -

    - -
    -
    - API Docs for: -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    Draggable Class

    -
    - - - - - -
    - Defined in: src/jquery.draggable.js:26 -
    - - - - - -
    - - - -
    -

    Basic drag implementation for DOM elements inside a container. -Provide start/stop/drag callbacks.

    -
    - - -
    -

    Constructor

    -
    -

    Draggable

    - - -
    - (
      - -
    • - - el - -
    • - -
    • - - [options] - -
    • - -
    ) -
    - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.draggable.js:26 - -

    - - - - - -
    - -
    - -
    - - -
    -

    Parameters:

    - -
      - -
    • - - el - HTMLElement - - - - -
      -

      The HTMLelement that contains all the widgets - to be dragged.

      -
      - - -
    • - -
    • - - [options] - Object - optional - - - - -
      -

      An Object with all options you want to - overwrite:

      -
      - - -
        - -
      • - - [items] - HTMLElement | String - optional - - -
        -

        Define who will - be the draggable items. Can be a CSS Selector String or a - collection of HTMLElements.

        -
        - - -
      • - -
      • - - [distance] - Number - optional - - -
        -

        Distance in pixels after mousedown - the mouse must move before dragging should start.

        -
        - - -
      • - -
      • - - [limit] - Boolean - optional - - -
        -

        Constrains dragging to the width of - the container

        -
        - - -
      • - -
      • - - [offset_left] - Offset_left - optional - - -
        -

        Offset added to the item - that is being dragged.

        -
        - - -
      • - -
      • - - [drag] - Number - optional - - -
        -

        Executes a callback when the mouse is - moved during the dragging.

        -
        - - -
      • - -
      • - - [start] - Number - optional - - -
        -

        Executes a callback when the drag - starts.

        -
        - - -
      • - -
      • - - [stop] - Number - optional - - -
        -

        Executes a callback when the drag stops.

        -
        - - -
      • - -
      - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns el. - -
    -
    - - - -
    - -
    - - -
    - - -
    -
    -

    Item Index

    - - - - - - - - -
    - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/docs/classes/Gridster.html b/docs/classes/Gridster.html deleted file mode 100644 index 51266028a..000000000 --- a/docs/classes/Gridster.html +++ /dev/null @@ -1,8243 +0,0 @@ - - - - - Gridster - - - - - - - - -
    -
    -
    - - -

    - -
    -
    - API Docs for: -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    Gridster Class

    -
    - -
    - Uses - -
    - - - - - -
    - Defined in: src/jquery.gridster.js:33 -
    - - - - - -
    - - - -
    - -
    - - -
    -

    Constructor

    -
    -

    Gridster

    - - -
    - (
      - -
    • - - el - -
    • - -
    • - - [options] - -
    • - -
    ) -
    - - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:33 - -

    - - - - - -
    - -
    - -
    - - -
    -

    Parameters:

    - -
      - -
    • - - el - HTMLElement - - - - -
      -

      The HTMLelement that contains all the widgets.

      -
      - - -
    • - -
    • - - [options] - Object - optional - - - - -
      -

      An Object with all options you want to - overwrite:

      -
      - - -
        - -
      • - - [widget_selector] - HTMLElement | String - optional - - -
        -

        Define who will - be the draggable widgets. Can be a CSS Selector String or a - collection of HTMLElements

        -
        - - -
      • - -
      • - - [widget_margins] - Array - optional - - -
        -

        Margin between widgets. - The first index for the horizontal margin (left, right) and - the second for the vertical margin (top, bottom).

        -
        - - -
      • - -
      • - - [widget_base_dimensions] - Array - optional - - -
        -

        Base widget dimensions - in pixels. The first index for the width and the second for the - height.

        -
        - - -
      • - -
      • - - [extra_cols] - Number - optional - - -
        -

        Add more columns in addition to - those that have been calculated.

        -
        - - -
      • - -
      • - - [extra_rows] - Number - optional - - -
        -

        Add more rows in addition to - those that have been calculated.

        -
        - - -
      • - -
      • - - [min_cols] - Number - optional - - -
        -

        The minimum required columns.

        -
        - - -
      • - -
      • - - [min_rows] - Number - optional - - -
        -

        The minimum required rows.

        -
        - - -
      • - -
      • - - [autogenerate_stylesheet] - Boolean - optional - - -
        -

        If true, all the - CSS required to position all widgets in their respective columns - and rows will be generated automatically and injected to the - <head> of the document. You can set this to false, and write - your own CSS targeting rows and cols via data-attributes like so: - [data-col="1"] { left: 10px; }

        -
        - - -
      • - -
      • - - [avoid_overlapped_widgets] - Boolean - optional - - -
        -

        Avoid that widgets loaded - from the DOM can be overlapped. It is helpful if the positions were - bad stored in the database or if there was any conflict.

        -
        - - -
      • - -
      • - - [serialize_params] - Function - optional - - -
        -

        Return the data you want - for each widget in the serialization. Two arguments are passed: - $w: the jQuery wrapped HTMLElement, and wgd: the grid - coords object (col, row, size_x, size_y).

        -
        - - -
      • - -
      • - - [collision] - Object - optional - - -
        -

        An Object with all options for - Collision class you want to overwrite. See Collision docs for - more info.

        -
        - - -
      • - -
      • - - [draggable] - Object - optional - - -
        -

        An Object with all options for - Draggable class you want to overwrite. See Draggable docs for more - info.

        -
        - - -
      • - -
      - -
    • - -
    -
    - - - - - -
    - -
    - - -
    - - -
    -
    -

    Item Index

    - - -
    -

    Methods

    - - -
    - - - - - - - -
    - - -
    -

    Methods

    - - -
    -

    add_style_tag

    - - -
    - (
      - -
    • - - css - -
    • - -
    ) -
    - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:2030 - -

    - - - - - -
    - -
    -

    Injects the given CSS as string to the head of the document.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - css - String - - - - -
      -

      The styles to apply.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns the instance of the Gridster class. - -
    -
    - - - -
    - - -
    -

    add_to_gridmap

    - - -
    - (
      - -
    • - - grid_data - -
    • - -
    • - - value - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:349 - -

    - - - - - -
    - -
    -

    Add a widget to the mapped array of positions.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - grid_data - Object - - - - -
      -

      The grid coords object representing the cells - to update in the mapped array.

      -
      - - -
    • - -
    • - - value - HTMLElement | Boolean - - - - -
      -

      The value to set in the specified - position .

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    add_widget

    - - -
    - (
      - -
    • - - html - -
    • - -
    • - - size_x - -
    • - -
    • - - size_y - -
    • - -
    ) -
    - - - - - HTMLElement - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:133 - -

    - - - - - -
    - -
    -

    Add a new widget to the grid.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - html - String - - - - -
      -

      The string representing the HTML of the widget.

      -
      - - -
    • - -
    • - - size_x - Number - - - - -
      -

      The nº of rows the widget occupies horizontally.

      -
      - - -
    • - -
    • - - size_y - Number - - - - -
      -

      The nº of columns the widget occupies vertically.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - HTMLElement: - - Returns the jQuery wrapped HTMLElement representing. - the widget that was just created. - -
    -
    - - - -
    - - -
    -

    can_go_player_up

    - - -
    - (
      - -
    • - - widget_grid_data - -
    • - -
    ) -
    - - - - - Number | Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1056 - -

    - - - - - -
    - -
    -

    Determines whether the player can move to a position above.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widget_grid_data - Object - - - - -
      -

      The actual grid coords object of the - player.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Number | Boolean: - - If the player can be moved to an upper row - returns the row number, else returns false. - -
    -
    - - - -
    - - -
    -

    can_go_up_to_row

    - - -
    - (
      - -
    • - - widget_grid_data - -
    • - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    ) -
    - - - - - Boolean | Number - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1469 - -

    - - - - - -
    - -
    -

    Check if the widget can move to the specified row, else returns the -upper row possible.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widget_grid_data - Number - - - - -
      -

      The current grid coords object of the - widget.

      -
      - - -
    • - -
    • - - col - Number - - - - -
      -

      The target column.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The target row.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean | Number: - - Returns the row number if the widget can move - to the target position, else returns false. - -
    -
    - - - -
    - - -
    -

    can_go_widget_up

    - - -
    - (
      - -
    • - - widget_grid_data - -
    • - -
    ) -
    - - - - - Number | Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1105 - -

    - - - - - -
    - -
    -

    Determines whether a widget can move to a position above.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widget_grid_data - Object - - - - -
      -

      The actual grid coords object of the - widget we want to check.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Number | Boolean: - - If the widget can be moved to an upper row - returns the row number, else returns false. - -
    -
    - - - -
    - - -
    -

    can_move_to

    - - -
    - (
      - -
    • - - widget_grid_data - -
    • - -
    • - - The - -
    • - -
    • - - The - -
    • - -
    ) -
    - - - - - Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1644 - -

    - - - - - -
    - -
    -

    Check if it's possible to move a widget to a specific col/row. It takes -into account the dimensions (size_y and size_x attrs. of the grid - coords object) the widget occupies.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widget_grid_data - Object - - - - -
      -

      The grid coords object that represents - the widget.

      -
      - - -
    • - -
    • - - The - Object - - - - -
      -

      col target col.

      -
      - - -
    • - -
    • - - The - Object - - - - -
      -

      row target row.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean: - - Returns true if all cells are empty, else return false. - -
    -
    - - - -
    - - -
    -

    draggable

    - - - () - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:371 - -

    - - - - - -
    - -
    -

    Make widgets draggable.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    empty_cells_player_occupies

    - - - () - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1606 - -

    - - - - - -
    - -
    -

    Remove from the array of mapped positions the reference to the player.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    enable

    - - - () - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:108 - -

    - - - - - -
    - -
    -

    Disable dragging.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    enable

    - - - () - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:121 - -

    - - - - - -
    - -
    -

    Enable dragging.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    for_each_cell_occupied

    - - -
    - (
      - -
    • - - el_grid_data - -
    • - -
    • - - callback - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1748 - -

    - - - - - -
    - -
    -

    Iterate over the cells occupied by a widget executing a function for -each one.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - el_grid_data - Object - - - - -
      -

      The grid coords object that represents the - widget.

      -
      - - -
    • - -
    • - - callback - Function - - - - -
      -

      The function to execute on each column - iteration. Column and row are passed as arguments.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    for_each_column_occupied

    - - -
    - (
      - -
    • - - el_grid_data - -
    • - -
    • - - callback - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1769 - -

    - - - - - -
    - -
    -

    Iterate over the columns occupied by a widget executing a function for -each one.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - el_grid_data - Object - - - - -
      -

      The grid coords object that represents - the widget.

      -
      - - -
    • - -
    • - - callback - Function - - - - -
      -

      The function to execute on each column - iteration. The column number is passed as first argument.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    for_each_row_occupied

    - - -
    - (
      - -
    • - - el_grid_data - -
    • - -
    • - - callback - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1788 - -

    - - - - - -
    - -
    -

    Iterate over the rows occupied by a widget executing a function for -each one.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - el_grid_data - Object - - - - -
      -

      The grid coords object that represents - the widget.

      -
      - - -
    • - -
    • - - callback - Function - - - - -
      -

      The function to execute on each column - iteration. The row number is passed as first argument.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    for_each_widget_above

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    • - - callback - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1855 - -

    - - - - - -
    - -
    -

    Iterate over each widget above the column and row specified.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to start iterating.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to start iterating.

      -
      - - -
    • - -
    • - - callback - Function - - - - -
      -

      The function to execute on each widget - iteration. The value of this inside the function is the jQuery - wrapped HTMLElement.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    for_each_widget_below

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    • - - callback - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1872 - -

    - - - - - -
    - -
    -

    Iterate over each widget below the column and row specified.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to start iterating.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to start iterating.

      -
      - - -
    • - -
    • - - callback - Function - - - - -
      -

      The function to execute on each widget - iteration. The value of this inside the function is the jQuery wrapped - HTMLElement.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    generate_faux_grid

    - - -
    - (
      - -
    • - - rows - -
    • - -
    • - - cols - -
    • - -
    ) -
    - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:2053 - -

    - - - - - -
    - -
    -

    Generates a faux grid to collide with it when a widget is dragged and -detect row or column that we want to go.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - rows - Number - - - - -
      -

      Number of columns.

      -
      - - -
    • - -
    • - - cols - Number - - - - -
      -

      Number of rows.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns the instance of the Gridster class. - -
    -
    - - - -
    - - -
    -

    generate_grid_and_stylesheet

    - - - () - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:2127 - -

    - - - - - -
    - -
    -

    Calculate columns and rows to be set based on the configuration - parameters, grid dimensions, etc ...

    -
    - - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns the instance of the Gridster class. - -
    -
    - - - -
    - - -
    -

    generate_stylesheet

    - - -
    - (
      - -
    • - - rows - -
    • - -
    • - - cols - -
    • - -
    ) -
    - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1960 - -

    - - - - - -
    - -
    -

    It generates the neccessary styles to position the widgets.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - rows - Number - - - - -
      -

      Number of columns.

      -
      - - -
    • - -
    • - - cols - Number - - - - -
      -

      Number of rows.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns the instance of the Gridster class. - -
    -
    - - - -
    - - -
    -

    get_cells_occupied

    - - -
    - (
      - -
    • - - el_grid_data - -
    • - -
    ) -
    - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1720 - -

    - - - - - -
    - -
    -

    Get all columns and rows that a widget occupies.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - el_grid_data - Object - - - - -
      -

      The grid coords object of the widget.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns an object like { cols: [], rows: []}. - -
    -
    - - - -
    - - -
    -

    get_highest_occupied_cell

    - - - () - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1889 - -

    - - - - - -
    - -
    -

    Returns the highest occupied cell in the grid.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns an object with col and row numbers. - -
    -
    - - - -
    - - -
    -

    get_targeted_columns

    - - -
    - (
      - -
    • - - [from_col] - -
    • - -
    ) -
    - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1684 - -

    - - - - - -
    - -
    -

    Given the leftmost column returns all columns that are overlapping - with the player.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - [from_col] - Number - optional - - - - -
      -

      The leftmost column.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns an array with column numbers. - -
    -
    - - - -
    - - -
    -

    get_targeted_rows

    - - -
    - (
      - -
    • - - [from_row] - -
    • - -
    ) -
    - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1703 - -

    - - - - - -
    - -
    -

    Given the upper row returns all rows that are overlapping with the player.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - [from_row] - Number - optional - - - - -
      -

      The upper row.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns an array with row numbers. - -
    -
    - - - -
    - - -
    -

    get_valid_rows

    - - -
    - (
      - -
    • - - widget_grid_data - -
    • - -
    • - - upper_rows - -
    • - -
    • - - min_row - -
    • - -
    ) -
    - - - - - Number | Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1158 - -

    - - - - - -
    - -
    -

    Search a valid row for the widget represented by widget_grid_data' in -theupperrowsarray. Iteration starts from row specified inminrow`.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widget_grid_data - Object - - - - -
      -

      The actual grid coords object of the - player.

      -
      - - -
    • - -
    • - - upper_rows - Array - - - - -
      -

      An array with columns as index and arrays - of valid rows as values.

      -
      - - -
    • - -
    • - - min_row - Number - - - - -
      -

      The upper row from which the iteration will start.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Number | Boolean: - - Returns the upper row valid from the upper_rows - for the widget in question. - -
    -
    - - - -
    - - -
    -

    get_widgets_from_DOM

    - - - () - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:2113 - -

    - - - - - -
    - -
    -

    Get all widgets in the DOM and register them.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns the instance of the Gridster class. - -
    -
    - - - -
    - - -
    -

    get_widgets_overlapped

    - - - () - - - - - HTMLElements - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1236 - -

    - - - - - -
    - -
    -

    Get widgets overlapping with the player.

    -
    - - - - -
    -

    Returns:

    - -
    - - - HTMLElements: - - Returns a jQuery collection of HTMLElements. - -
    -
    - - - -
    - - -
    -

    get_widgets_under_player

    - - - () - - - - - HTMLElement - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:985 - -

    - - - - - -
    - -
    -

    Get widgets overlapping with the player.

    -
    - - - - -
    -

    Returns:

    - -
    - - - HTMLElement: - - Returns a jQuery collection of HTMLElements - -
    -
    - - - -
    - - -
    -

    is_empty

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    ) -
    - - - - - Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:904 - -

    - - - - - -
    - -
    -

    Determines if the cell represented by col and row params is empty.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to check.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to check.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean: - - Returns true or false. - -
    -
    - - - -
    - - -
    -

    is_occupied

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    ) -
    - - - - - Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:923 - -

    - - - - - -
    - -
    -

    Determines if the cell represented by col and row params is occupied.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to check.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to check.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean: - - Returns true or false. - -
    -
    - - - -
    - - -
    -

    is_placeholder_in

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    ) -
    - - - - - Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:877 - -

    - - - - - -
    - -
    -

    Determines if the placeholder is currently over the row and col given.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to check.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to check.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean: - - Returns true or false. - -
    -
    - - - -
    - - -
    -

    is_placeholder_in_col

    - - -
    - (
      - -
    • - - col - -
    • - -
    ) -
    - - - - - Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:891 - -

    - - - - - -
    - -
    -

    Determines if the placeholder is currently over the column given.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to check.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean: - - Returns true or false. - -
    -
    - - - -
    - - -
    -

    is_player

    - - -
    - (
      - -
    • - - col_or_el - -
    • - -
    • - - [row] - -
    • - -
    ) -
    - - - - - Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:845 - -

    - - - - - -
    - -
    -

    Determines if there is a widget in the row and col given. Or if the -HTMLElement passed as first argument is the player.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col_or_el - Number | HTMLElement - - - - -
      -

      A jQuery wrapped collection of -HTMLElements.

      -
      - - -
    • - -
    • - - [row] - Number - optional - - - - -
      -

      The column to which we want to move the widgets.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean: - - Returns true or false. - -
    -
    - - - -
    - - -
    -

    is_player_in

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    ) -
    - - - - - Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:862 - -

    - - - - - -
    - -
    -

    Determines if the widget that is being dragged is currently over the row -and col given.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to check.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to check.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean: - - Returns true or false. - -
    -
    - - - -
    - - -
    -

    is_widget

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    ) -
    - - - - - Boolean | HTMLElement - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:943 - -

    - - - - - -
    - -
    -

    Determines if there is a widget in the cell represented by col/row params.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to check.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to check.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean | HTMLElement: - - Returns false if there is no widget, -else returns the jQuery HTMLElement - -
    -
    - - - -
    - - -
    -

    is_widget_under_player

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    ) -
    - - - - - Boolean - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:968 - -

    - - - - - -
    - -
    -

    Determines if there is a widget in the cell represented by col/row -params and if this is under the widget that is being dragged.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to check.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to check.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Boolean: - - Returns true or false. - -
    -
    - - - -
    - - -
    -

    manage_movements

    - - -
    - (
      - -
    • - - $widgets - -
    • - -
    • - - to_col - -
    • - -
    • - - to_row - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:799 - -

    - - - - - -
    - -
    -

    Sorts an Array of grid coords objects (representing the grid coords of -each widget) in descending way.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - $widgets - HTMLElements - - - - -
      -

      A jQuery collection of HTMLElements - representing the widgets you want to move.

      -
      - - -
    • - -
    • - - to_col - Number - - - - -
      -

      The column to which we want to move the widgets.

      -
      - - -
    • - -
    • - - to_row - Number - - - - -
      -

      The row to which we want to move the widgets.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    move_widget_down

    - - -
    - (
      - -
    • - - $widget - -
    • - -
    • - - The - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1423 - -

    - - - - - -
    - -
    -

    Move down the specified widget and all below it.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - $widget - HTMLElement - - - - -
      -

      The jQuery object representing the widget - you want to move.

      -
      - - -
    • - -
    • - - The - Number - - - - -
      -

      number of cells that the widget has to move.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    move_widget_to

    - - -
    - (
      - -
    • - - $widget - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1331 - -

    - - - - - -
    - -
    -

    Move a widget to a specific row. The cell or cells must be empty. -If the widget has widgets below, all of these widgets will be moved also -if they can.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - $widget - HTMLElement - - - - -
      -

      The jQuery wrapped HTMLElement of the -widget is going to be moved.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    move_widget_up

    - - -
    - (
      - -
    • - - $widget - -
    • - -
    • - - [y_units] - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1375 - -

    - - - - - -
    - -
    -

    Move up the specified widget and all below it.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - $widget - HTMLElement - - - - -
      -

      The widget you want to move.

      -
      - - -
    • - -
    • - - [y_units] - Number - optional - - - - -
      -

      The number of cells that the widget has to move.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    next_position

    - - -
    - (
      - -
    • - - size_x - -
    • - -
    • - - size_y - -
    • - -
    ) -
    - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:163 - -

    - - - - - -
    - -
    -

    Get the most left column below to add a new widget.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - size_x - Number - - - - -
      -

      The nº of rows the widget occupies horizontally.

      -
      - - -
    • - -
    • - - size_y - Number - - - - -
      -

      The nº of columns the widget occupies vertically.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns a grid coords object representing the future - widget coords. - -
    -
    - - - -
    - - -
    -

    on_drag

    - - -
    - (
      - -
    • - - The - -
    • - -
    • - - A - -
    • - -
    ) -
    - - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:461 - -

    - - - - - -
    - -
    -

    This function is executed when the player is being dragged.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - The - Event - - - - -
      -

      original browser event

      -
      - - -
    • - -
    • - - A - Object - - - - -
      -

      prepared ui object.

      -
      - - -
    • - -
    -
    - - - - - -
    - - -
    -

    on_overlapped_column_change

    - - -
    - (
      - -
    • - - start_callback - -
    • - -
    • - - stop_callback - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:555 - -

    - - - - - -
    - -
    -

    Executes the callbacks passed as arguments when a column begins to be -overlapped or stops being overlapped.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - start_callback - Function - - - - -
      -

      Function executed when a new column - begins to be overlapped. The column is passed as first argument.

      -
      - - -
    • - -
    • - - stop_callback - Function - - - - -
      -

      Function executed when a column stops - being overlapped. The column is passed as first argument.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    on_overlapped_row_change

    - - -
    - (
      - -
    • - - start_callback - -
    • - -
    • - - stop_callback - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:595 - -

    - - - - - -
    - -
    -

    Executes the callbacks passed as arguments when a row starts to be -overlapped or stops being overlapped.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - start_callback - Function - - - - -
      -

      Function executed when a new row begins - to be overlapped. The row is passed as first argument.

      -
      - - -
    • - -
    • - - stop_callback - Function - - - - -
      -

      Function executed when a row stops being - overlapped. The row is passed as first argument.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    on_start_drag

    - - -
    - (
      - -
    • - - The - -
    • - -
    • - - A - -
    • - -
    ) -
    - - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:410 - -

    - - - - - -
    - -
    -

    This function is executed when the player begins to be dragged.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - The - Event - - - - -
      -

      original browser event

      -
      - - -
    • - -
    • - - A - Object - - - - -
      -

      prepared ui object.

      -
      - - -
    • - -
    -
    - - - - - -
    - - -
    -

    on_start_overlapping_column

    - - -
    - (
      - -
    • - - col - -
    • - -
    ) -
    - - - - - HTMLElements - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1269 - -

    - - - - - -
    - -
    -

    This callback is executed when the player begins to collide with a column.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The collided column.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - HTMLElements: - - Returns a jQuery collection of HTMLElements. - -
    -
    - - - -
    - - -
    -

    on_start_overlapping_row

    - - -
    - (
      - -
    • - - col - -
    • - -
    ) -
    - - - - - HTMLElements - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1281 - -

    - - - - - -
    - -
    -

    A callback executed when the player begins to collide with a row.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The collided row.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - HTMLElements: - - Returns a jQuery collection of HTMLElements. - -
    -
    - - - -
    - - -
    -

    on_stop_drag

    - - -
    - (
      - -
    • - - The - -
    • - -
    • - - A - -
    • - -
    ) -
    - - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:499 - -

    - - - - - -
    - -
    -

    This function is executed when the player stops being dragged.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - The - Event - - - - -
      -

      original browser event

      -
      - - -
    • - -
    • - - A - Object - - - - -
      -

      prepared ui object.

      -
      - - -
    • - -
    -
    - - - - - -
    - - -
    -

    on_stop_overlapping_column

    - - -
    - (
      - -
    • - - col - -
    • - -
    ) -
    - - - - - HTMLElements - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1293 - -

    - - - - - -
    - -
    -

    A callback executed when the the player ends to collide with a column.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The collided row.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - HTMLElements: - - Returns a jQuery collection of HTMLElements. - -
    -
    - - - -
    - - -
    -

    on_stop_overlapping_row

    - - -
    - (
      - -
    • - - row - -
    • - -
    ) -
    - - - - - HTMLElements - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1311 - -

    - - - - - -
    - -
    -

    This callback is executed when the player ends to collide with a row.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - row - Number - - - - -
      -

      The collided row.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - HTMLElements: - - Returns a jQuery collection of HTMLElements. - -
    -
    - - - -
    - - -
    -

    recalculate_faux_grid

    - - - () - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:2089 - -

    - - - - - -
    - -
    -

    Recalculates the offsets for the faux grid. You need to use it when -the browser is resized.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns the instance of the Gridster class. - -
    -
    - - - -
    - - -
    -

    register_widget

    - - - () - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:272 - -

    - - - - - -
    - -
    -

    Creates the grid coords object representing the widget a add it to the -mapped array of positions.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns the instance of the Gridster class. - -
    -
    - - - -
    - - -
    -

    remove_from_gridmap

    - - -
    - (
      - -
    • - - grid_data - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:336 - -

    - - - - - -
    - -
    -

    Remove a widget from the mapped array of positions.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - grid_data - Object - - - - -
      -

      The grid coords object representing the cells - to update in the mapped array.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    remove_widget

    - - -
    - (
      - -
    • - - el - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:205 - -

    - - - - - -
    - -
    -

    Remove a widget from the grid.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - el - HTMLElement - - - - -
      -

      The jQuery wrapped HTMLElement you want to remove.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    serialize

    - - -
    - (
      - -
    • - - [$widgets] - -
    • - -
    ) -
    - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:237 - -

    - - - - - -
    - -
    -

    Returns a serialized array of the widgets in the grid.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - [$widgets] - HTMLElement - optional - - - - -
      -

      The collection of jQuery wrapped - HTMLElements you want to serialize. If no argument is passed all widgets - will be serialized.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns an Array of Objects with the data specified in - the serialize_params option. - -
    -
    - - - -
    - - -
    -

    serialize_changed

    - - - () - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:259 - -

    - - - - - -
    - -
    -

    Returns a serialized array of the widgets that have changed their - position.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns an Array of Objects with the data specified in - the serialize_params option. - -
    -
    - - - -
    - - -
    -

    set_cells_player_occupies

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - col - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1589 - -

    - - - - - -
    - -
    -

    Update the array of mapped positions with the new player position.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The new player col.

      -
      - - -
    • - -
    • - - col - Number - - - - -
      -

      The new player row.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    set_dom_grid_height

    - - - () - - - - - Object - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1947 - -

    - - - - - -
    - -
    -

    Set the current height of the parent grid.

    -
    - - - - -
    -

    Returns:

    - -
    - - - Object: - - Returns the instance of the Gridster class. - -
    -
    - - - -
    - - -
    -

    set_placeholder

    - - -
    - (
      - -
    • - - col - -
    • - -
    • - - row - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1007 - -

    - - - - - -
    - -
    -

    Put placeholder at the row and column specified.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - col - Number - - - - -
      -

      The column to which we want to move the - placeholder.

      -
      - - -
    • - -
    • - - row - Number - - - - -
      -

      The row to which we want to move the - placeholder.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    set_player

    - - -
    - (
      - -
    • - - start_callback - -
    • - -
    • - - stop_callback - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:631 - -

    - - - - - -
    - -
    -

    Sets the current position of the player

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - start_callback - Function - - - - -
      -

      Function executed when a new row begins - to be overlapped. The row is passed as first argument.

      -
      - - -
    • - -
    • - - stop_callback - Function - - - - -
      -

      Function executed when a row stops being - overlapped. The row is passed as first argument.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    sort_by_col_asc

    - - -
    - (
      - -
    • - - widgets - -
    • - -
    ) -
    - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:760 - -

    - - - - - -
    - -
    -

    Sorts an Array of grid coords objects by column (representing the grid -coords of each widget) in ascending way.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widgets - Array - - - - -
      -

      Array of grid coords objects

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns the array sorted. - -
    -
    - - - -
    - - -
    -

    sort_by_row_and_col_asc

    - - -
    - (
      - -
    • - - widgets - -
    • - -
    ) -
    - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:740 - -

    - - - - - -
    - -
    -

    Sorts an Array of grid coords objects (representing the grid coords of -each widget) placing first the empty cells upper left.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widgets - Array - - - - -
      -

      Array of grid coords objects

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns the array sorted. - -
    -
    - - - -
    - - -
    -

    sort_by_row_asc

    - - -
    - (
      - -
    • - - widgets - -
    • - -
    ) -
    - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:720 - -

    - - - - - -
    - -
    -

    Sorts an Array of grid coords objects (representing the grid coords of -each widget) in ascending way.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widgets - Array - - - - -
      -

      Array of grid coords objects

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns the array sorted. - -
    -
    - - - -
    - - -
    -

    sort_by_row_desc

    - - -
    - (
      - -
    • - - widgets - -
    • - -
    ) -
    - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:780 - -

    - - - - - -
    - -
    -

    Sorts an Array of grid coords objects (representing the grid coords of -each widget) in descending way.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - widgets - Array - - - - -
      -

      Array of grid coords objects

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns the array sorted. - -
    -
    - - - -
    - - -
    -

    update_widget_position

    - - -
    - (
      - -
    • - - grid_data - -
    • - -
    • - - value - -
    • - -
    ) -
    - - - - - Class - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:315 - -

    - - - - - -
    - -
    -

    Update in the mapped array of positions the value of cells represented by -the grid coords object passed in the grid_data param.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - grid_data - Object - - - - -
      -

      The grid coords object representing the cells - to update in the mapped array.

      -
      - - -
    • - -
    • - - value - HTMLElement | Boolean - - - - -
      -

      Pass false or the jQuery wrapped - HTMLElement, depends if you want to delete an existing position or add - a new one.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Class: - - Returns the instance of the Gridster Class. - -
    -
    - - - -
    - - -
    -

    widgets_below

    - - -
    - (
      - -
    • - - $el - -
    • - -
    ) -
    - - - - - HTMLElements - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:1560 - -

    - - - - - -
    - -
    -

    Get widgets below a widget.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - $el - HTMLElement - - - - -
      -

      The jQuery wrapped HTMLElement.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - HTMLElements: - - A jQuery collection of HTMLElements. - -
    -
    - - - -
    - - -
    -

    widgets_contraints

    - - -
    - (
      - -
    • - - $widgets - -
    • - -
    ) -
    - - - - - Array - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - src/jquery.gridster.js:684 - -

    - - - - - -
    - -
    -

    See which of the widgets in the $widgets param collection can go to -a upper row and which not.

    -
    - - -
    -

    Parameters:

    - -
      - -
    • - - $widgets - HTMLElements - - - - -
      -

      A jQuery wrapped collection of -HTMLElements.

      -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Array: - - Returns a literal Object with two keys: can_go_up & -can_not_go_up. Each contains a set of HTMLElements. - -
    -
    - - - -
    - - -
    - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/docs/classes/index.html b/docs/classes/index.html deleted file mode 100644 index 487fe15b2..000000000 --- a/docs/classes/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Redirector - - - - Click here to redirect - - diff --git a/docs/data.json b/docs/data.json deleted file mode 100644 index c83bd743d..000000000 --- a/docs/data.json +++ /dev/null @@ -1,1665 +0,0 @@ -{ - "project": {}, - "files": { - "src/jquery.collision.js": { - "name": "src/jquery.collision.js", - "modules": {}, - "classes": { - "Collision": 1 - }, - "fors": {}, - "namespaces": {} - }, - "src/jquery.coords.js": { - "name": "src/jquery.coords.js", - "modules": {}, - "classes": { - "Coords": 1 - }, - "fors": {}, - "namespaces": {} - }, - "src/jquery.draggable.js": { - "name": "src/jquery.draggable.js", - "modules": {}, - "classes": { - "Draggable": 1 - }, - "fors": {}, - "namespaces": {} - }, - "src/jquery.gridster.js": { - "name": "src/jquery.gridster.js", - "modules": {}, - "classes": { - "Gridster": 1 - }, - "fors": {}, - "namespaces": {} - } - }, - "modules": {}, - "classes": { - "Collision": { - "name": "Collision", - "shortname": "Collision", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [ - "Gridster" - ], - "file": "src/jquery.collision.js", - "line": 19, - "description": "Detects collisions between a DOM element against other DOM elements or\nCoords objects.", - "uses": [ - "Coords" - ], - "params": [ - { - "name": "el", - "description": "The jQuery wrapped HTMLElement.", - "type": "HTMLElement" - }, - { - "name": "colliders", - "description": "Can be a jQuery collection\n of HTMLElements or an Array of Coords instances.", - "type": "HTMLElement|Array" - }, - { - "name": "options", - "description": "An Object with all options you want to\n overwrite:", - "type": "Object", - "optional": true, - "props": [ - { - "name": "on_overlap_start", - "description": "Executes a function the first\n time each `collider ` is overlapped.", - "type": "Function", - "optional": true - }, - { - "name": "on_overlap_stop", - "description": "Executes a function when a\n `collider` is no longer collided.", - "type": "Function", - "optional": true - }, - { - "name": "on_overlap", - "description": "Executes a function when the\nmouse is moved during the collision.", - "type": "Function", - "optional": true - } - ] - } - ], - "return": { - "description": "Collision instance.", - "type": "Object" - }, - "is_constructor": 1 - }, - "Coords": { - "name": "Coords", - "shortname": "Coords", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [ - "Collision" - ], - "file": "src/jquery.coords.js", - "line": 10, - "description": "Creates objects with coordinates (x1, y1, x2, y2, cx, cy, width, height)\nto simulate DOM elements on the screen.\nCoords is used by Gridster to create a faux grid with any DOM element can\ncollide.", - "params": [ - { - "name": "obj", - "description": "The jQuery HTMLElement or a object with: left,\ntop, width and height properties.", - "type": "HTMLElement|Object" - } - ], - "return": { - "description": "Coords instance.", - "type": "Object" - }, - "is_constructor": 1 - }, - "Draggable": { - "name": "Draggable", - "shortname": "Draggable", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [ - "Gridster" - ], - "file": "src/jquery.draggable.js", - "line": 26, - "description": "Basic drag implementation for DOM elements inside a container.\nProvide start/stop/drag callbacks.", - "params": [ - { - "name": "el", - "description": "The HTMLelement that contains all the widgets\n to be dragged.", - "type": "HTMLElement" - }, - { - "name": "options", - "description": "An Object with all options you want to\n overwrite:", - "type": "Object", - "optional": true, - "props": [ - { - "name": "items", - "description": "Define who will\n be the draggable items. Can be a CSS Selector String or a\n collection of HTMLElements.", - "type": "HTMLElement|String", - "optional": true - }, - { - "name": "distance", - "description": "Distance in pixels after mousedown\n the mouse must move before dragging should start.", - "type": "Number", - "optional": true - }, - { - "name": "limit", - "description": "Constrains dragging to the width of\n the container", - "type": "Boolean", - "optional": true - }, - { - "name": "offset_left", - "description": "Offset added to the item\n that is being dragged.", - "type": "Offset_left", - "optional": true - }, - { - "name": "drag", - "description": "Executes a callback when the mouse is\n moved during the dragging.", - "type": "Number", - "optional": true - }, - { - "name": "start", - "description": "Executes a callback when the drag\n starts.", - "type": "Number", - "optional": true - }, - { - "name": "stop", - "description": "Executes a callback when the drag stops.", - "type": "Number", - "optional": true - } - ] - } - ], - "return": { - "description": "Returns `el`.", - "type": "Object" - }, - "is_constructor": 1 - }, - "Gridster": { - "name": "Gridster", - "shortname": "Gridster", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "file": "src/jquery.gridster.js", - "line": 33, - "uses": [ - "Draggable", - "Collision" - ], - "params": [ - { - "name": "el", - "description": "The HTMLelement that contains all the widgets.", - "type": "HTMLElement" - }, - { - "name": "options", - "description": "An Object with all options you want to\n overwrite:", - "type": "Object", - "optional": true, - "props": [ - { - "name": "widget_selector", - "description": "Define who will\n be the draggable widgets. Can be a CSS Selector String or a\n collection of HTMLElements", - "type": "HTMLElement|String", - "optional": true - }, - { - "name": "widget_margins", - "description": "Margin between widgets.\n The first index for the horizontal margin (left, right) and\n the second for the vertical margin (top, bottom).", - "type": "Array", - "optional": true - }, - { - "name": "widget_base_dimensions", - "description": "Base widget dimensions\n in pixels. The first index for the width and the second for the\n height.", - "type": "Array", - "optional": true - }, - { - "name": "extra_cols", - "description": "Add more columns in addition to\n those that have been calculated.", - "type": "Number", - "optional": true - }, - { - "name": "extra_rows", - "description": "Add more rows in addition to\n those that have been calculated.", - "type": "Number", - "optional": true - }, - { - "name": "min_cols", - "description": "The minimum required columns.", - "type": "Number", - "optional": true - }, - { - "name": "min_rows", - "description": "The minimum required rows.", - "type": "Number", - "optional": true - }, - { - "name": "autogenerate_stylesheet", - "description": "If true, all the\n CSS required to position all widgets in their respective columns\n and rows will be generated automatically and injected to the\n `` of the document. You can set this to false, and write\n your own CSS targeting rows and cols via data-attributes like so:\n `[data-col=\"1\"] { left: 10px; }`", - "type": "Boolean", - "optional": true - }, - { - "name": "avoid_overlapped_widgets", - "description": "Avoid that widgets loaded\n from the DOM can be overlapped. It is helpful if the positions were\n bad stored in the database or if there was any conflict.", - "type": "Boolean", - "optional": true - }, - { - "name": "serialize_params", - "description": "Return the data you want\n for each widget in the serialization. Two arguments are passed:\n `$w`: the jQuery wrapped HTMLElement, and `wgd`: the grid\n coords object (`col`, `row`, `size_x`, `size_y`).", - "type": "Function", - "optional": true - }, - { - "name": "collision", - "description": "An Object with all options for\n Collision class you want to overwrite. See Collision docs for\n more info.", - "type": "Object", - "optional": true - }, - { - "name": "draggable", - "description": "An Object with all options for\n Draggable class you want to overwrite. See Draggable docs for more\n info.", - "type": "Object", - "optional": true - } - ] - } - ], - "is_constructor": 1 - } - }, - "classitems": [ - { - "file": "src/jquery.gridster.js", - "line": 108, - "description": "Disable dragging.", - "itemtype": "method", - "name": "enable", - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 121, - "description": "Enable dragging.", - "itemtype": "method", - "name": "enable", - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 133, - "description": "Add a new widget to the grid.", - "itemtype": "method", - "name": "add_widget", - "params": [ - { - "name": "html", - "description": "The string representing the HTML of the widget.", - "type": "String" - }, - { - "name": "size_x", - "description": "The nº of rows the widget occupies horizontally.", - "type": "Number" - }, - { - "name": "size_y", - "description": "The nº of columns the widget occupies vertically.", - "type": "Number" - } - ], - "return": { - "description": "Returns the jQuery wrapped HTMLElement representing.\n the widget that was just created.", - "type": "HTMLElement" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 163, - "description": "Get the most left column below to add a new widget.", - "itemtype": "method", - "name": "next_position", - "params": [ - { - "name": "size_x", - "description": "The nº of rows the widget occupies horizontally.", - "type": "Number" - }, - { - "name": "size_y", - "description": "The nº of columns the widget occupies vertically.", - "type": "Number" - } - ], - "return": { - "description": "Returns a grid coords object representing the future\n widget coords.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 205, - "description": "Remove a widget from the grid.", - "itemtype": "method", - "name": "remove_widget", - "params": [ - { - "name": "el", - "description": "The jQuery wrapped HTMLElement you want to remove.", - "type": "HTMLElement" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 237, - "description": "Returns a serialized array of the widgets in the grid.", - "itemtype": "method", - "name": "serialize", - "params": [ - { - "name": "$widgets", - "description": "The collection of jQuery wrapped\n HTMLElements you want to serialize. If no argument is passed all widgets\n will be serialized.", - "type": "HTMLElement", - "optional": true - } - ], - "return": { - "description": "Returns an Array of Objects with the data specified in\n the serialize_params option.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 259, - "description": "Returns a serialized array of the widgets that have changed their\n position.", - "itemtype": "method", - "name": "serialize_changed", - "return": { - "description": "Returns an Array of Objects with the data specified in\n the serialize_params option.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 272, - "description": "Creates the grid coords object representing the widget a add it to the\nmapped array of positions.", - "itemtype": "method", - "name": "register_widget", - "return": { - "description": "Returns the instance of the Gridster class.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 315, - "description": "Update in the mapped array of positions the value of cells represented by\nthe grid coords object passed in the `grid_data` param.", - "params": [ - { - "name": "grid_data", - "description": "The grid coords object representing the cells\n to update in the mapped array.", - "type": "Object" - }, - { - "name": "value", - "description": "Pass `false` or the jQuery wrapped\n HTMLElement, depends if you want to delete an existing position or add\n a new one.", - "type": "HTMLElement|Boolean" - } - ], - "itemtype": "method", - "name": "update_widget_position", - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 336, - "description": "Remove a widget from the mapped array of positions.", - "itemtype": "method", - "name": "remove_from_gridmap", - "params": [ - { - "name": "grid_data", - "description": "The grid coords object representing the cells\n to update in the mapped array.", - "type": "Object" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 349, - "description": "Add a widget to the mapped array of positions.", - "itemtype": "method", - "name": "add_to_gridmap", - "params": [ - { - "name": "grid_data", - "description": "The grid coords object representing the cells\n to update in the mapped array.", - "type": "Object" - }, - { - "name": "value", - "description": "The value to set in the specified\n position .", - "type": "HTMLElement|Boolean" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 371, - "description": "Make widgets draggable.", - "uses": [ - "Draggable" - ], - "itemtype": "method", - "name": "draggable", - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 410, - "description": "This function is executed when the player begins to be dragged.", - "itemtype": "method", - "name": "on_start_drag", - "params": [ - { - "name": "The", - "description": "original browser event", - "type": "Event" - }, - { - "name": "A", - "description": "prepared ui object.", - "type": "Object" - } - ], - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 461, - "description": "This function is executed when the player is being dragged.", - "itemtype": "method", - "name": "on_drag", - "params": [ - { - "name": "The", - "description": "original browser event", - "type": "Event" - }, - { - "name": "A", - "description": "prepared ui object.", - "type": "Object" - } - ], - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 499, - "description": "This function is executed when the player stops being dragged.", - "itemtype": "method", - "name": "on_stop_drag", - "params": [ - { - "name": "The", - "description": "original browser event", - "type": "Event" - }, - { - "name": "A", - "description": "prepared ui object.", - "type": "Object" - } - ], - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 555, - "description": "Executes the callbacks passed as arguments when a column begins to be\noverlapped or stops being overlapped.", - "params": [ - { - "name": "start_callback", - "description": "Function executed when a new column\n begins to be overlapped. The column is passed as first argument.", - "type": "Function" - }, - { - "name": "stop_callback", - "description": "Function executed when a column stops\n being overlapped. The column is passed as first argument.", - "type": "Function" - } - ], - "itemtype": "method", - "name": "on_overlapped_column_change", - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 595, - "description": "Executes the callbacks passed as arguments when a row starts to be\noverlapped or stops being overlapped.", - "params": [ - { - "name": "start_callback", - "description": "Function executed when a new row begins\n to be overlapped. The row is passed as first argument.", - "type": "Function" - }, - { - "name": "stop_callback", - "description": "Function executed when a row stops being\n overlapped. The row is passed as first argument.", - "type": "Function" - } - ], - "itemtype": "method", - "name": "on_overlapped_row_change", - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 631, - "description": "Sets the current position of the player", - "params": [ - { - "name": "start_callback", - "description": "Function executed when a new row begins\n to be overlapped. The row is passed as first argument.", - "type": "Function" - }, - { - "name": "stop_callback", - "description": "Function executed when a row stops being\n overlapped. The row is passed as first argument.", - "type": "Function" - } - ], - "itemtype": "method", - "name": "set_player", - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 684, - "description": "See which of the widgets in the $widgets param collection can go to\na upper row and which not.", - "itemtype": "method", - "name": "widgets_contraints", - "params": [ - { - "name": "$widgets", - "description": "A jQuery wrapped collection of\nHTMLElements.", - "type": "HTMLElements" - } - ], - "return": { - "description": "Returns a literal Object with two keys: `can_go_up` &\n`can_not_go_up`. Each contains a set of HTMLElements.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 720, - "description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in ascending way.", - "itemtype": "method", - "name": "sort_by_row_asc", - "params": [ - { - "name": "widgets", - "description": "Array of grid coords objects", - "type": "Array" - } - ], - "return": { - "description": "Returns the array sorted.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 740, - "description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) placing first the empty cells upper left.", - "itemtype": "method", - "name": "sort_by_row_and_col_asc", - "params": [ - { - "name": "widgets", - "description": "Array of grid coords objects", - "type": "Array" - } - ], - "return": { - "description": "Returns the array sorted.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 760, - "description": "Sorts an Array of grid coords objects by column (representing the grid\ncoords of each widget) in ascending way.", - "itemtype": "method", - "name": "sort_by_col_asc", - "params": [ - { - "name": "widgets", - "description": "Array of grid coords objects", - "type": "Array" - } - ], - "return": { - "description": "Returns the array sorted.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 780, - "description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in descending way.", - "itemtype": "method", - "name": "sort_by_row_desc", - "params": [ - { - "name": "widgets", - "description": "Array of grid coords objects", - "type": "Array" - } - ], - "return": { - "description": "Returns the array sorted.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 799, - "description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in descending way.", - "itemtype": "method", - "name": "manage_movements", - "params": [ - { - "name": "$widgets", - "description": "A jQuery collection of HTMLElements\n representing the widgets you want to move.", - "type": "HTMLElements" - }, - { - "name": "to_col", - "description": "The column to which we want to move the widgets.", - "type": "Number" - }, - { - "name": "to_row", - "description": "The row to which we want to move the widgets.", - "type": "Number" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 845, - "description": "Determines if there is a widget in the row and col given. Or if the\nHTMLElement passed as first argument is the player.", - "itemtype": "method", - "name": "is_player", - "params": [ - { - "name": "col_or_el", - "description": "A jQuery wrapped collection of\nHTMLElements.", - "type": "Number|HTMLElement" - }, - { - "name": "row", - "description": "The column to which we want to move the widgets.", - "type": "Number", - "optional": true - } - ], - "return": { - "description": "Returns true or false.", - "type": "Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 862, - "description": "Determines if the widget that is being dragged is currently over the row\nand col given.", - "itemtype": "method", - "name": "is_player_in", - "params": [ - { - "name": "col", - "description": "The column to check.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to check.", - "type": "Number" - } - ], - "return": { - "description": "Returns true or false.", - "type": "Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 877, - "description": "Determines if the placeholder is currently over the row and col given.", - "itemtype": "method", - "name": "is_placeholder_in", - "params": [ - { - "name": "col", - "description": "The column to check.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to check.", - "type": "Number" - } - ], - "return": { - "description": "Returns true or false.", - "type": "Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 891, - "description": "Determines if the placeholder is currently over the column given.", - "itemtype": "method", - "name": "is_placeholder_in_col", - "params": [ - { - "name": "col", - "description": "The column to check.", - "type": "Number" - } - ], - "return": { - "description": "Returns true or false.", - "type": "Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 904, - "description": "Determines if the cell represented by col and row params is empty.", - "itemtype": "method", - "name": "is_empty", - "params": [ - { - "name": "col", - "description": "The column to check.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to check.", - "type": "Number" - } - ], - "return": { - "description": "Returns true or false.", - "type": "Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 923, - "description": "Determines if the cell represented by col and row params is occupied.", - "itemtype": "method", - "name": "is_occupied", - "params": [ - { - "name": "col", - "description": "The column to check.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to check.", - "type": "Number" - } - ], - "return": { - "description": "Returns true or false.", - "type": "Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 943, - "description": "Determines if there is a widget in the cell represented by col/row params.", - "itemtype": "method", - "name": "is_widget", - "params": [ - { - "name": "col", - "description": "The column to check.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to check.", - "type": "Number" - } - ], - "return": { - "description": "Returns false if there is no widget,\nelse returns the jQuery HTMLElement", - "type": "Boolean|HTMLElement" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 968, - "description": "Determines if there is a widget in the cell represented by col/row\nparams and if this is under the widget that is being dragged.", - "itemtype": "method", - "name": "is_widget_under_player", - "params": [ - { - "name": "col", - "description": "The column to check.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to check.", - "type": "Number" - } - ], - "return": { - "description": "Returns true or false.", - "type": "Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 985, - "description": "Get widgets overlapping with the player.", - "itemtype": "method", - "name": "get_widgets_under_player", - "return": { - "description": "Returns a jQuery collection of HTMLElements", - "type": "HTMLElement" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1007, - "description": "Put placeholder at the row and column specified.", - "itemtype": "method", - "name": "set_placeholder", - "params": [ - { - "name": "col", - "description": "The column to which we want to move the\n placeholder.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to which we want to move the\n placeholder.", - "type": "Number" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1056, - "description": "Determines whether the player can move to a position above.", - "itemtype": "method", - "name": "can_go_player_up", - "params": [ - { - "name": "widget_grid_data", - "description": "The actual grid coords object of the\n player.", - "type": "Object" - } - ], - "return": { - "description": "If the player can be moved to an upper row\n returns the row number, else returns false.", - "type": "Number|Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1105, - "description": "Determines whether a widget can move to a position above.", - "itemtype": "method", - "name": "can_go_widget_up", - "params": [ - { - "name": "widget_grid_data", - "description": "The actual grid coords object of the\n widget we want to check.", - "type": "Object" - } - ], - "return": { - "description": "If the widget can be moved to an upper row\n returns the row number, else returns false.", - "type": "Number|Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1158, - "description": "Search a valid row for the widget represented by `widget_grid_data' in\nthe `upper_rows` array. Iteration starts from row specified in `min_row`.", - "itemtype": "method", - "name": "get_valid_rows", - "params": [ - { - "name": "widget_grid_data", - "description": "The actual grid coords object of the\n player.", - "type": "Object" - }, - { - "name": "upper_rows", - "description": "An array with columns as index and arrays\n of valid rows as values.", - "type": "Array" - }, - { - "name": "min_row", - "description": "The upper row from which the iteration will start.", - "type": "Number" - } - ], - "return": { - "description": "Returns the upper row valid from the `upper_rows`\n for the widget in question.", - "type": "Number|Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1236, - "description": "Get widgets overlapping with the player.", - "itemtype": "method", - "name": "get_widgets_overlapped", - "return": { - "description": "Returns a jQuery collection of HTMLElements.", - "type": "HTMLElements" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1269, - "description": "This callback is executed when the player begins to collide with a column.", - "itemtype": "method", - "name": "on_start_overlapping_column", - "params": [ - { - "name": "col", - "description": "The collided column.", - "type": "Number" - } - ], - "return": { - "description": "Returns a jQuery collection of HTMLElements.", - "type": "HTMLElements" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1281, - "description": "A callback executed when the player begins to collide with a row.", - "itemtype": "method", - "name": "on_start_overlapping_row", - "params": [ - { - "name": "col", - "description": "The collided row.", - "type": "Number" - } - ], - "return": { - "description": "Returns a jQuery collection of HTMLElements.", - "type": "HTMLElements" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1293, - "description": "A callback executed when the the player ends to collide with a column.", - "itemtype": "method", - "name": "on_stop_overlapping_column", - "params": [ - { - "name": "col", - "description": "The collided row.", - "type": "Number" - } - ], - "return": { - "description": "Returns a jQuery collection of HTMLElements.", - "type": "HTMLElements" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1311, - "description": "This callback is executed when the player ends to collide with a row.", - "itemtype": "method", - "name": "on_stop_overlapping_row", - "params": [ - { - "name": "row", - "description": "The collided row.", - "type": "Number" - } - ], - "return": { - "description": "Returns a jQuery collection of HTMLElements.", - "type": "HTMLElements" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1331, - "description": "Move a widget to a specific row. The cell or cells must be empty.\nIf the widget has widgets below, all of these widgets will be moved also\nif they can.", - "itemtype": "method", - "name": "move_widget_to", - "params": [ - { - "name": "$widget", - "description": "The jQuery wrapped HTMLElement of the\nwidget is going to be moved.", - "type": "HTMLElement" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1375, - "description": "Move up the specified widget and all below it.", - "itemtype": "method", - "name": "move_widget_up", - "params": [ - { - "name": "$widget", - "description": "The widget you want to move.", - "type": "HTMLElement" - }, - { - "name": "y_units", - "description": "The number of cells that the widget has to move.", - "type": "Number", - "optional": true - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1423, - "description": "Move down the specified widget and all below it.", - "itemtype": "method", - "name": "move_widget_down", - "params": [ - { - "name": "$widget", - "description": "The jQuery object representing the widget\n you want to move.", - "type": "HTMLElement" - }, - { - "name": "The", - "description": "number of cells that the widget has to move.", - "type": "Number" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1469, - "description": "Check if the widget can move to the specified row, else returns the\nupper row possible.", - "itemtype": "method", - "name": "can_go_up_to_row", - "params": [ - { - "name": "widget_grid_data", - "description": "The current grid coords object of the\n widget.", - "type": "Number" - }, - { - "name": "col", - "description": "The target column.", - "type": "Number" - }, - { - "name": "row", - "description": "The target row.", - "type": "Number" - } - ], - "return": { - "description": "Returns the row number if the widget can move\n to the target position, else returns false.", - "type": "Boolean|Number" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1560, - "description": "Get widgets below a widget.", - "itemtype": "method", - "name": "widgets_below", - "params": [ - { - "name": "$el", - "description": "The jQuery wrapped HTMLElement.", - "type": "HTMLElement" - } - ], - "return": { - "description": "A jQuery collection of HTMLElements.", - "type": "HTMLElements" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1589, - "description": "Update the array of mapped positions with the new player position.", - "itemtype": "method", - "name": "set_cells_player_occupies", - "params": [ - { - "name": "col", - "description": "The new player col.", - "type": "Number" - }, - { - "name": "col", - "description": "The new player row.", - "type": "Number" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1606, - "description": "Remove from the array of mapped positions the reference to the player.", - "itemtype": "method", - "name": "empty_cells_player_occupies", - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1644, - "description": "Check if it's possible to move a widget to a specific col/row. It takes\ninto account the dimensions (`size_y` and `size_x` attrs. of the grid\n coords object) the widget occupies.", - "itemtype": "method", - "name": "can_move_to", - "params": [ - { - "name": "widget_grid_data", - "description": "The grid coords object that represents\n the widget.", - "type": "Object" - }, - { - "name": "The", - "description": "col target col.", - "type": "Object" - }, - { - "name": "The", - "description": "row target row.", - "type": "Object" - } - ], - "return": { - "description": "Returns true if all cells are empty, else return false.", - "type": "Boolean" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1684, - "description": "Given the leftmost column returns all columns that are overlapping\n with the player.", - "itemtype": "method", - "name": "get_targeted_columns", - "params": [ - { - "name": "from_col", - "description": "The leftmost column.", - "type": "Number", - "optional": true - } - ], - "return": { - "description": "Returns an array with column numbers.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1703, - "description": "Given the upper row returns all rows that are overlapping with the player.", - "itemtype": "method", - "name": "get_targeted_rows", - "params": [ - { - "name": "from_row", - "description": "The upper row.", - "type": "Number", - "optional": true - } - ], - "return": { - "description": "Returns an array with row numbers.", - "type": "Array" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1720, - "description": "Get all columns and rows that a widget occupies.", - "itemtype": "method", - "name": "get_cells_occupied", - "params": [ - { - "name": "el_grid_data", - "description": "The grid coords object of the widget.", - "type": "Object" - } - ], - "return": { - "description": "Returns an object like `{ cols: [], rows: []}`.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1748, - "description": "Iterate over the cells occupied by a widget executing a function for\neach one.", - "itemtype": "method", - "name": "for_each_cell_occupied", - "params": [ - { - "name": "el_grid_data", - "description": "The grid coords object that represents the\n widget.", - "type": "Object" - }, - { - "name": "callback", - "description": "The function to execute on each column\n iteration. Column and row are passed as arguments.", - "type": "Function" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1769, - "description": "Iterate over the columns occupied by a widget executing a function for\neach one.", - "itemtype": "method", - "name": "for_each_column_occupied", - "params": [ - { - "name": "el_grid_data", - "description": "The grid coords object that represents\n the widget.", - "type": "Object" - }, - { - "name": "callback", - "description": "The function to execute on each column\n iteration. The column number is passed as first argument.", - "type": "Function" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1788, - "description": "Iterate over the rows occupied by a widget executing a function for\neach one.", - "itemtype": "method", - "name": "for_each_row_occupied", - "params": [ - { - "name": "el_grid_data", - "description": "The grid coords object that represents\n the widget.", - "type": "Object" - }, - { - "name": "callback", - "description": "The function to execute on each column\n iteration. The row number is passed as first argument.", - "type": "Function" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1855, - "description": "Iterate over each widget above the column and row specified.", - "itemtype": "method", - "name": "for_each_widget_above", - "params": [ - { - "name": "col", - "description": "The column to start iterating.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to start iterating.", - "type": "Number" - }, - { - "name": "callback", - "description": "The function to execute on each widget\n iteration. The value of `this` inside the function is the jQuery\n wrapped HTMLElement.", - "type": "Function" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1872, - "description": "Iterate over each widget below the column and row specified.", - "itemtype": "method", - "name": "for_each_widget_below", - "params": [ - { - "name": "col", - "description": "The column to start iterating.", - "type": "Number" - }, - { - "name": "row", - "description": "The row to start iterating.", - "type": "Number" - }, - { - "name": "callback", - "description": "The function to execute on each widget\n iteration. The value of `this` inside the function is the jQuery wrapped\n HTMLElement.", - "type": "Function" - } - ], - "return": { - "description": "Returns the instance of the Gridster Class.", - "type": "Class" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1889, - "description": "Returns the highest occupied cell in the grid.", - "itemtype": "method", - "name": "get_highest_occupied_cell", - "return": { - "description": "Returns an object with `col` and `row` numbers.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1947, - "description": "Set the current height of the parent grid.", - "itemtype": "method", - "name": "set_dom_grid_height", - "return": { - "description": "Returns the instance of the Gridster class.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 1960, - "description": "It generates the neccessary styles to position the widgets.", - "itemtype": "method", - "name": "generate_stylesheet", - "params": [ - { - "name": "rows", - "description": "Number of columns.", - "type": "Number" - }, - { - "name": "cols", - "description": "Number of rows.", - "type": "Number" - } - ], - "return": { - "description": "Returns the instance of the Gridster class.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 2030, - "description": "Injects the given CSS as string to the head of the document.", - "itemtype": "method", - "name": "add_style_tag", - "params": [ - { - "name": "css", - "description": "The styles to apply.", - "type": "String" - } - ], - "return": { - "description": "Returns the instance of the Gridster class.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 2053, - "description": "Generates a faux grid to collide with it when a widget is dragged and\ndetect row or column that we want to go.", - "itemtype": "method", - "name": "generate_faux_grid", - "params": [ - { - "name": "rows", - "description": "Number of columns.", - "type": "Number" - }, - { - "name": "cols", - "description": "Number of rows.", - "type": "Number" - } - ], - "return": { - "description": "Returns the instance of the Gridster class.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 2089, - "description": "Recalculates the offsets for the faux grid. You need to use it when\nthe browser is resized.", - "itemtype": "method", - "name": "recalculate_faux_grid", - "return": { - "description": "Returns the instance of the Gridster class.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 2113, - "description": "Get all widgets in the DOM and register them.", - "itemtype": "method", - "name": "get_widgets_from_DOM", - "return": { - "description": "Returns the instance of the Gridster class.", - "type": "Object" - }, - "class": "Gridster" - }, - { - "file": "src/jquery.gridster.js", - "line": 2127, - "description": "Calculate columns and rows to be set based on the configuration\n parameters, grid dimensions, etc ...", - "itemtype": "method", - "name": "generate_grid_and_stylesheet", - "return": { - "description": "Returns the instance of the Gridster class.", - "type": "Object" - }, - "class": "Gridster" - } - ] -} \ No newline at end of file diff --git a/docs/files/index.html b/docs/files/index.html deleted file mode 100644 index 487fe15b2..000000000 --- a/docs/files/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Redirector - - - - Click here to redirect - - diff --git a/docs/files/src_jquery.collision.js.html b/docs/files/src_jquery.collision.js.html deleted file mode 100644 index c15c3c627..000000000 --- a/docs/files/src_jquery.collision.js.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - src/jquery.collision.js - - - - - - - - -
    -
    -
    - - -

    - -
    -
    - API Docs for: -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    File: src/jquery.collision.js

    - -
    -
    -/*
    - * jquery.collision
    - * https://github.com/ducksboard/gridster.js
    - *
    - * Copyright (c) 2012 ducksboard
    - * Licensed under the MIT, GPL licenses.
    - */
    -
    -;(function($, window, document, undefined){
    -
    -    var defaults = {
    -        colliders_context: document.body
    -        // ,on_overlap: function(collider_data){},
    -        // on_overlap_start : function(collider_data){},
    -        // on_overlap_stop : function(collider_data){}
    -    };
    -
    -
    -    /**
    -    * Detects collisions between a DOM element against other DOM elements or
    -    * Coords objects.
    -    *
    -    * @class Collision
    -    * @uses Coords
    -    * @param {HTMLElement} el The jQuery wrapped HTMLElement.
    -    * @param {HTMLElement|Array} colliders Can be a jQuery collection
    -    *  of HTMLElements or an Array of Coords instances.
    -    * @param {Object} [options] An Object with all options you want to
    -    *        overwrite:
    -    *   @param {Function} [options.on_overlap_start] Executes a function the first
    -    *    time each `collider ` is overlapped.
    -    *   @param {Function} [options.on_overlap_stop] Executes a function when a
    -    *    `collider` is no longer collided.
    -    *   @param {Function} [options.on_overlap] Executes a function when the
    -    * mouse is moved during the collision.
    -    * @return {Object} Collision instance.
    -    * @constructor
    -    */
    -    function Collision(el, colliders, options) {
    -        this.options = $.extend(defaults, options);
    -        this.$element = el;
    -        this.last_colliders = [];
    -        this.last_colliders_coords = [];
    -        if (typeof colliders === 'string' || colliders instanceof jQuery) {
    -            this.$colliders = $(colliders,
    -                 this.options.colliders_context).not(this.$element);
    -        }else{
    -            this.colliders = $(colliders);
    -        }
    -
    -        this.init();
    -    }
    -
    -
    -    var fn = Collision.prototype;
    -
    -
    -    fn.init = function() {
    -        this.find_collisions();
    -    };
    -
    -
    -    fn.overlaps = function(a, b) {
    -        var x = false;
    -        var y = false;
    -
    -        if ((b.x1 >= a.x1 && b.x1 <= a.x2) ||
    -            (b.x2 >= a.x1 && b.x2 <= a.x2) ||
    -            (a.x1 >= b.x1 && a.x2 <= b.x2)
    -        ) { x = true; }
    -
    -        if ((b.y1 >= a.y1 && b.y1 <= a.y2) ||
    -            (b.y2 >= a.y1 && b.y2 <= a.y2) ||
    -            (a.y1 >= b.y1 && a.y2 <= b.y2)
    -        ) { y = true; }
    -
    -        return (x && y);
    -    };
    -
    -
    -    fn.detect_overlapping_region = function(a, b){
    -        var regionX = '';
    -        var regionY = '';
    -
    -        if (a.y1 > b.cy && a.y1 < b.y2) { regionX = 'N'; }
    -        if (a.y2 > b.y1 && a.y2 < b.cy) { regionX = 'S'; }
    -        if (a.x1 > b.cx && a.x1 < b.x2) { regionY = 'W'; }
    -        if (a.x2 > b.x1 && a.x2 < b.cx) { regionY = 'E'; }
    -
    -        return (regionX + regionY) || 'C';
    -    };
    -
    -
    -    fn.calculate_overlapped_area_coords = function(a, b){
    -        var x1 = Math.max(a.x1, b.x1);
    -        var y1 = Math.max(a.y1, b.y1);
    -        var x2 = Math.min(a.x2, b.x2);
    -        var y2 = Math.min(a.y2, b.y2);
    -
    -        return $({
    -            left: x1,
    -            top: y1,
    -             width : (x2 - x1),
    -            height: (y2 - y1)
    -          }).coords().get();
    -    };
    -
    -
    -    fn.calculate_overlapped_area = function(coords){
    -        return (coords.width * coords.height);
    -    };
    -
    -
    -    fn.manage_colliders_start_stop = function(new_colliders_coords, start_callback, stop_callback){
    -        var last = this.last_colliders_coords;
    -
    -        for (var i = 0, il = last.length; i < il; i++) {
    -            if ($.inArray(last[i], new_colliders_coords) === -1) {
    -                start_callback.call(this, last[i]);
    -            }
    -        }
    -
    -        for (var j = 0, jl = new_colliders_coords.length; j < jl; j++) {
    -            if ($.inArray(new_colliders_coords[j], last) === -1) {
    -                stop_callback.call(this, new_colliders_coords[j]);
    -            }
    -
    -        }
    -    };
    -
    -
    -    fn.find_collisions = function(player_data_coords){
    -        var self = this;
    -        var colliders_coords = [];
    -        var colliders_data = [];
    -        var $colliders = (this.colliders || this.$colliders);
    -        var count = $colliders.length;
    -        var player_coords = self.$element.coords()
    -                             .update(player_data_coords || false).get();
    -
    -        while(count--){
    -          var $collider = self.$colliders ?
    -                           $($colliders[count]) : $colliders[count];
    -          var $collider_coords_ins = ($collider.isCoords) ?
    -                  $collider : $collider.coords();
    -          var collider_coords = $collider_coords_ins.get();
    -          var overlaps = self.overlaps(player_coords, collider_coords);
    -
    -          if (!overlaps) {
    -            continue;
    -          }
    -
    -          var region = self.detect_overlapping_region(
    -              player_coords, collider_coords);
    -
    -            //todo: make this an option
    -            if (region === 'C'){
    -                var area_coords = self.calculate_overlapped_area_coords(
    -                    player_coords, collider_coords);
    -                var area = self.calculate_overlapped_area(area_coords);
    -                var collider_data = {
    -                    area: area,
    -                    area_coords : area_coords,
    -                    region: region,
    -                    coords: collider_coords,
    -                    player_coords: player_coords,
    -                    el: $collider
    -                };
    -
    -                if (self.options.on_overlap) {
    -                    self.options.on_overlap.call(this, collider_data);
    -                }
    -                colliders_coords.push($collider_coords_ins);
    -                colliders_data.push(collider_data);
    -            }
    -        }
    -
    -        if (self.options.on_overlap_stop || self.options.on_overlap_start) {
    -            this.manage_colliders_start_stop(colliders_coords,
    -                self.options.on_overlap_stop, self.options.on_overlap_start);
    -        }
    -
    -        this.last_colliders_coords = colliders_coords;
    -
    -        return colliders_data;
    -    };
    -
    -
    -    fn.get_closest_colliders = function(player_data_coords){
    -        var colliders = this.find_collisions(player_data_coords);
    -        var min_area = 100;
    -        colliders.sort(function(a, b){
    -            if (a.area <= min_area) {
    -              return 1;
    -            }
    -
    -            /* if colliders are being overlapped by the "C" (center) region,
    -             * we have to set a lower index in the array to which they are placed
    -             * above in the grid. */
    -            if (a.region === 'C' && b.region === 'C') {
    -                if (a.coords.y1 < b.coords.y1 || a.coords.x1 < b.coords.x1) {
    -                    return - 1;
    -                }else{
    -                    return 1;
    -                }
    -            }
    -
    -            if (a.area < b.area){
    -                return 1;
    -            }
    -
    -            return 1;
    -        });
    -        return colliders;
    -    };
    -
    -
    -    //jQuery adapter
    -    $.fn.collision = function(collider, options) {
    -          return new Collision( this, collider, options );
    -    };
    -
    -
    -}(jQuery, window, document));
    -
    -    
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/docs/files/src_jquery.coords.js.html b/docs/files/src_jquery.coords.js.html deleted file mode 100644 index d9957d937..000000000 --- a/docs/files/src_jquery.coords.js.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - src/jquery.coords.js - - - - - - - - -
    -
    -
    - - -

    - -
    -
    - API Docs for: -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    File: src/jquery.coords.js

    - -
    -
    -/*
    - * jquery.coords
    - * https://github.com/ducksboard/gridster.js
    - *
    - * Copyright (c) 2012 ducksboard
    - * Licensed under the MIT, GPL licenses.
    - */
    -
    -;(function($, window, document, undefined){
    -    /**
    -    * Creates objects with coordinates (x1, y1, x2, y2, cx, cy, width, height)
    -    * to simulate DOM elements on the screen.
    -    * Coords is used by Gridster to create a faux grid with any DOM element can
    -    * collide.
    -    *
    -    * @class Coords
    -    * @param {HTMLElement|Object} obj The jQuery HTMLElement or a object with: left,
    -    * top, width and height properties.
    -    * @return {Object} Coords instance.
    -    * @constructor
    -    */
    -    function Coords(obj) {
    -        if (obj[0] && $.isPlainObject(obj[0])) {
    -            this.data = obj[0];
    -        }else {
    -            this.el = obj;
    -        }
    -
    -        this.isCoords = true;
    -        this.coords = {};
    -        this.init();
    -        return this;
    -    }
    -
    -
    -    var fn = Coords.prototype;
    -
    -
    -    fn.init = function(){
    -        this.set();
    -        this.original_coords = this.get();
    -    };
    -
    -
    -    fn.set = function(update, not_update_offsets) {
    -        var el = this.el;
    -
    -        if (el && !update) {
    -            this.data = el.offset();
    -            this.data.width = el.width();
    -            this.data.height = el.height();
    -        }
    -
    -        if (el && update && !not_update_offsets) {
    -            var offset = el.offset();
    -            this.data.top = offset.top;
    -            this.data.left = offset.left;
    -        }
    -
    -        var d = this.data;
    -
    -        this.coords.x1 = d.left;
    -        this.coords.y1 = d.top;
    -        this.coords.x2 = d.left + d.width;
    -        this.coords.y2 = d.top + d.height;
    -        this.coords.cx = d.left + (d.width / 2);
    -        this.coords.cy = d.top + (d.height / 2);
    -        this.coords.width  = d.width;
    -        this.coords.height = d.height;
    -        this.coords.el  = el || false ;
    -
    -        return this;
    -    };
    -
    -
    -    fn.update = function(data){
    -        if (!data && !this.el) {
    -            return this;
    -        }
    -
    -        if (data) {
    -            var new_data = $.extend({}, this.data, data);
    -            this.data = new_data;
    -            return this.set(true, true);
    -        }
    -
    -        this.set(true);
    -        return this;
    -    };
    -
    -
    -    fn.get = function(){
    -        return this.coords;
    -    };
    -
    -
    -    //jQuery adapter
    -    $.fn.coords = function() {
    -        if (this.data('coords') ) {
    -            return this.data('coords');
    -        }
    -
    -        var ins = new Coords(this, arguments[0]);
    -        this.data('coords', ins);
    -        return ins;
    -    };
    -
    -}(jQuery, window, document));
    -
    -    
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/docs/files/src_jquery.draggable.js.html b/docs/files/src_jquery.draggable.js.html deleted file mode 100644 index 6eb57e111..000000000 --- a/docs/files/src_jquery.draggable.js.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - src/jquery.draggable.js - - - - - - - - -
    -
    -
    - - -

    - -
    -
    - API Docs for: -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    File: src/jquery.draggable.js

    - -
    -
    -/*
    - * jquery.draggable
    - * https://github.com/ducksboard/gridster.js
    - *
    - * Copyright (c) 2012 ducksboard
    - * Licensed under the MIT, GPL licenses.
    - */
    -
    -;(function($, window, document, undefined){
    -
    -    var defaults = {
    -        items: '.gs_w',
    -        distance: 1,
    -        limit: true,
    -        offset_left: 0,
    -        autoscroll: true
    -        // ,drag: function(e){},
    -        // start : function(e, ui){},
    -        // stop : function(e){}
    -    };
    -
    -    var $body = $(document.body);
    -    var $window = $(window);
    -
    -
    -    /**
    -    * Basic drag implementation for DOM elements inside a container.
    -    * Provide start/stop/drag callbacks.
    -    *
    -    * @class Draggable
    -    * @param {HTMLElement} el The HTMLelement that contains all the widgets
    -    *  to be dragged.
    -    * @param {Object} [options] An Object with all options you want to
    -    *        overwrite:
    -    *    @param {HTMLElement|String} [options.items] Define who will
    -    *     be the draggable items. Can be a CSS Selector String or a
    -    *     collection of HTMLElements.
    -    *    @param {Number} [options.distance] Distance in pixels after mousedown
    -    *     the mouse must move before dragging should start.
    -    *    @param {Boolean} [options.limit] Constrains dragging to the width of
    -    *     the container
    -    *    @param {offset_left} [options.offset_left] Offset added to the item
    -    *     that is being dragged.
    -    *    @param {Number} [options.drag] Executes a callback when the mouse is
    -    *     moved during the dragging.
    -    *    @param {Number} [options.start] Executes a callback when the drag
    -    *     starts.
    -    *    @param {Number} [options.stop] Executes a callback when the drag stops.
    -    * @return {Object} Returns `el`.
    -    * @constructor
    -    */
    -    function Draggable(el, options) {
    -      this.options = $.extend({}, defaults, options);
    -      this.$container = $(el);
    -      this.$dragitems = $(this.options.items, this.$container);
    -      this.is_dragging = false;
    -      this.player_min_left = 0 + this.options.offset_left;
    -      this.init();
    -    }
    -
    -    var fn = Draggable.prototype;
    -
    -    fn.init = function() {
    -        this.calculate_positions();
    -        this.$container.css('position', 'relative');
    -        this.enable();
    -
    -        $(window).bind('resize',
    -            throttle($.proxy(this.calculate_positions, this), 200));
    -    };
    -
    -
    -    fn.get_actual_pos = function($el) {
    -        var pos = $el.position();
    -        return pos;
    -    };
    -
    -
    -    fn.get_mouse_pos = function(e) {
    -        return {
    -            left: e.clientX,
    -            top: e.clientY
    -        };
    -    };
    -
    -
    -    fn.get_offset = function(e) {
    -        e.preventDefault();
    -        var mouse_actual_pos = this.get_mouse_pos(e);
    -        var diff_x = Math.round(
    -            mouse_actual_pos.left - this.mouse_init_pos.left);
    -        var diff_y = Math.round(mouse_actual_pos.top - this.mouse_init_pos.top);
    -
    -        var left = Math.round(this.el_init_offset.left + diff_x - this.baseX);
    -        var top = Math.round(
    -            this.el_init_offset.top + diff_y - this.baseY + this.scrollOffset);
    -
    -        if (this.options.limit) {
    -            if (left > this.player_max_left) {
    -                left = this.player_max_left;
    -            }else if(left < this.player_min_left) {
    -                left = this.player_min_left;
    -            }
    -        }
    -
    -        return {
    -            left: left,
    -            top: top,
    -            mouse_left: mouse_actual_pos.left,
    -            mouse_top: mouse_actual_pos.top
    -        };
    -    };
    -
    -
    -    fn.manage_scroll = function(offset) {
    -        /* scroll document */
    -        var nextScrollTop;
    -        var scrollTop = $window.scrollTop();
    -        var min_window_y = scrollTop;
    -        var max_window_y = min_window_y + this.window_height;
    -
    -        var mouse_down_zone = max_window_y - 30;
    -        var mouse_up_zone = min_window_y + 20;
    -
    -        var abs_mouse_left = offset.mouse_left;
    -        var abs_mouse_top = min_window_y + offset.mouse_top;
    -
    -        var max_player_y = (this.doc_height - this.window_height +
    -            this.player_height);
    -
    -        if (abs_mouse_top >= mouse_down_zone) {
    -            nextScrollTop = scrollTop + 10;
    -            if (nextScrollTop < max_player_y) {
    -                $window.scrollTop(nextScrollTop);
    -                this.scrollOffset = this.scrollOffset + 10;
    -            }
    -        };
    -
    -        if (abs_mouse_top <= mouse_up_zone) {
    -            nextScrollTop = scrollTop - 10;
    -            if (nextScrollTop > 0) {
    -                $window.scrollTop(nextScrollTop);
    -                this.scrollOffset = this.scrollOffset - 10;
    -            }
    -        };
    -    }
    -
    -
    -    fn.calculate_positions = function(e) {
    -        this.window_height = $window.height();
    -    }
    -
    -
    -    fn.drag_handler = function(e) {
    -        if (e.which !== 1) {
    -            return false;
    -        }
    -
    -        var self = this;
    -        var first = true;
    -        this.$player = $(e.currentTarget);
    -
    -        this.el_init_pos = this.get_actual_pos(this.$player);
    -        this.mouse_init_pos = this.get_mouse_pos(e);
    -        this.offsetY = this.mouse_init_pos.top - this.el_init_pos.top;
    -
    -        $body.on('mousemove.draggable', function(mme){
    -
    -            var mouse_actual_pos = self.get_mouse_pos(mme);
    -            var diff_x = Math.abs(
    -                mouse_actual_pos.left - self.mouse_init_pos.left);
    -            var diff_y = Math.abs(
    -                mouse_actual_pos.top - self.mouse_init_pos.top);
    -            if (!(diff_x > self.options.distance ||
    -                diff_y > self.options.distance)
    -            ) {
    -                return false;
    -            }
    -
    -            if (first) {
    -                first = false;
    -                self.on_dragstart.call(self, mme);
    -                return false;
    -            }
    -
    -            if (self.is_dragging == true) {
    -                self.on_dragmove.call(self, mme);
    -            }
    -
    -            return false;
    -
    -        });
    -
    -        return false;
    -    };
    -
    -
    -    fn.on_dragstart = function(e) {
    -        e.preventDefault();
    -        this.drag_start = true;
    -        this.is_dragging = true;
    -        var offset = this.$container.offset();
    -        this.baseX = Math.round(offset.left);
    -        this.baseY = Math.round(offset.top);
    -        this.doc_height = $(document).height();
    -
    -        if (this.options.helper === 'clone') {
    -            this.$helper = this.$player.clone()
    -                .appendTo(this.$container).addClass('helper');
    -            this.helper = true;
    -        }else{
    -            this.helper = false;
    -        }
    -        this.scrollOffset = 0;
    -        this.el_init_offset = this.$player.offset();
    -        this.player_width = this.$player.width();
    -        this.player_height = this.$player.height();
    -        this.player_max_left = (this.$container.width() - this.player_width +
    -            this.options.offset_left);
    -
    -        if (this.options.start) {
    -            this.options.start.call(this.$player, e, {
    -                helper: this.helper ? this.$helper : this.$player
    -            });
    -        }
    -        return false;
    -    };
    -
    -
    -    fn.on_dragmove = function(e) {
    -        var offset = this.get_offset(e);
    -
    -        this.options.autoscroll && this.manage_scroll(offset);
    -
    -        (this.helper ? this.$helper : this.$player).css({
    -            'position': 'absolute',
    -            'left' : offset.left,
    -            'top' : offset.top
    -        });
    -
    -        var ui = {
    -            'position': {
    -                'left': offset.left,
    -                'top': offset.top
    -            }
    -        };
    -
    -        if (this.options.drag) {
    -            this.options.drag.call(this.$player, e, ui);
    -        }
    -        return false;
    -    };
    -
    -
    -    fn.on_dragstop = function(e) {
    -        var offset = this.get_offset(e);
    -        this.drag_start = false;
    -
    -        var ui = {
    -            'position': {
    -                'left': offset.left,
    -                'top': offset.top
    -            }
    -        };
    -
    -        if (this.options.stop) {
    -            this.options.stop.call(this.$player, e, ui);
    -        }
    -
    -        if (this.helper) {
    -            this.$helper.remove();
    -        }
    -
    -        return false;
    -    };
    -
    -
    -    fn.enable = function(){
    -        this.$container.on('mousedown.draggable', this.options.items, $.proxy(
    -            this.drag_handler, this));
    -
    -        $body.on('mouseup.draggable', $.proxy(function(e) {
    -            this.is_dragging = false;
    -            $body.off('mousemove.draggable');
    -            if (this.drag_start) {
    -                this.on_dragstop(e);
    -            }
    -        }, this));
    -    };
    -
    -
    -    fn.disable = function(){
    -        this.$container.off('mousedown.draggable');
    -        $body.off('mouseup.draggable');
    -    };
    -
    -
    -    fn.destroy = function(){
    -        this.disable();
    -        $.removeData(this.$container, 'draggable');
    -    };
    -
    -
    -    //jQuery adapter
    -    $.fn.draggable = function ( options ) {
    -        return this.each(function () {
    -            if (!$.data(this, 'draggable')) {
    -                $.data(this, 'draggable', new Draggable( this, options ));
    -            }
    -        });
    -    };
    -
    -
    -}(jQuery, window, document));
    -
    -    
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/docs/files/src_jquery.gridster.js.html b/docs/files/src_jquery.gridster.js.html deleted file mode 100644 index 107d67ebe..000000000 --- a/docs/files/src_jquery.gridster.js.html +++ /dev/null @@ -1,2299 +0,0 @@ - - - - - src/jquery.gridster.js - - - - - - - - -
    -
    -
    - - -

    - -
    -
    - API Docs for: -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    File: src/jquery.gridster.js

    - -
    -
    -/*
    - * jquery.gridster
    - * https://github.com/ducksboard/gridster.js
    - *
    - * Copyright (c) 2012 ducksboard
    - * Licensed under the MIT, GPL licenses.
    - */
    -;(function($, window, document, undefined) {
    -
    -    var defaults = {
    -        widget_selector: '> li',
    -        widget_margins: [10, 10],
    -        widget_base_dimensions: [400, 225],
    -        extra_rows: 0,
    -        extra_cols: 0,
    -        min_cols: 1,
    -        min_rows: 15,
    -        autogenerate_stylesheet: true,
    -        avoid_overlapped_widgets: true,
    -        serialize_params: function($w, wgd) {
    -            return {
    -                col: wgd.col,
    -                row: wgd.row
    -            };
    -        },
    -        collision: {},
    -        draggable: {
    -            distance: 4
    -        }
    -    };
    -
    -
    -    /**
    -    * @class Gridster
    -    * @uses Draggable
    -    * @uses Collision
    -    * @param {HTMLElement} el The HTMLelement that contains all the widgets.
    -    * @param {Object} [options] An Object with all options you want to
    -    *        overwrite:
    -    *    @param {HTMLElement|String} [options.widget_selector] Define who will
    -    *     be the draggable widgets. Can be a CSS Selector String or a
    -    *     collection of HTMLElements
    -    *    @param {Array} [options.widget_margins] Margin between widgets.
    -    *     The first index for the horizontal margin (left, right) and
    -    *     the second for the vertical margin (top, bottom).
    -    *    @param {Array} [options.widget_base_dimensions] Base widget dimensions
    -    *     in pixels. The first index for the width and the second for the
    -    *     height.
    -    *    @param {Number} [options.extra_cols] Add more columns in addition to
    -    *     those that have been calculated.
    -    *    @param {Number} [options.extra_rows] Add more rows in addition to
    -    *     those that have been calculated.
    -    *    @param {Number} [options.min_cols] The minimum required columns.
    -    *    @param {Number} [options.min_rows] The minimum required rows.
    -    *    @param {Boolean} [options.autogenerate_stylesheet] If true, all the
    -    *     CSS required to position all widgets in their respective columns
    -    *     and rows will be generated automatically and injected to the
    -    *     `<head>` of the document. You can set this to false, and write
    -    *     your own CSS targeting rows and cols via data-attributes like so:
    -    *     `[data-col="1"] { left: 10px; }`
    -    *    @param {Boolean} [options.avoid_overlapped_widgets] Avoid that widgets loaded
    -    *     from the DOM can be overlapped. It is helpful if the positions were
    -    *     bad stored in the database or if there was any conflict.
    -    *    @param {Function} [options.serialize_params] Return the data you want
    -    *     for each widget in the serialization. Two arguments are passed:
    -    *     `$w`: the jQuery wrapped HTMLElement, and `wgd`: the grid
    -    *     coords object (`col`, `row`, `size_x`, `size_y`).
    -    *    @param {Object} [options.collision] An Object with all options for
    -    *     Collision class you want to overwrite. See Collision docs for
    -    *     more info.
    -    *    @param {Object} [options.draggable] An Object with all options for
    -    *     Draggable class you want to overwrite. See Draggable docs for more
    -    *     info.
    -    *
    -    * @constructor
    -    */
    -    function Gridster(el, options) {
    -      this.options = $.extend(true, defaults, options);
    -      this.$el = $(el);
    -      this.$wrapper = this.$el.parent();
    -      this.$widgets = $(this.options.widget_selector, this.$el).addClass('gs_w');
    -      this.widgets = [];
    -      this.$changed = $([]);
    -      this.wrapper_width = this.$wrapper.width();
    -      this.min_widget_width = (this.options.widget_margins[0] * 2) +
    -        this.options.widget_base_dimensions[0];
    -      this.min_widget_height = (this.options.widget_margins[1] * 2) +
    -        this.options.widget_base_dimensions[1];
    -      this.init();
    -    }
    -
    -    Gridster.generated_stylesheets = [];
    -
    -    var fn = Gridster.prototype;
    -
    -    fn.init = function() {
    -      this.generate_grid_and_stylesheet();
    -      this.get_widgets_from_DOM();
    -      this.set_dom_grid_height();
    -      this.$wrapper.addClass('ready');
    -      this.draggable();
    -
    -      $(window).bind(
    -        'resize', throttle($.proxy(this.recalculate_faux_grid, this), 200));
    -    };
    -
    -
    -    /**
    -    * Disable dragging.
    -    *
    -    * @method enable
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.disable = function() {
    -        this.$wrapper.find('.player-revert').removeClass('player-revert');
    -        this.drag_api.disable();
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Enable dragging.
    -    *
    -    * @method enable
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.enable = function() {
    -        this.drag_api.enable();
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Add a new widget to the grid.
    -    *
    -    * @method add_widget
    -    * @param {String} html The string representing the HTML of the widget.
    -    * @param {Number} size_x The nº of rows the widget occupies horizontally.
    -    * @param {Number} size_y The nº of columns the widget occupies vertically.
    -    * @return {HTMLElement} Returns the jQuery wrapped HTMLElement representing.
    -    *  the widget that was just created.
    -    */
    -    fn.add_widget = function(html, size_x, size_y) {
    -        var next_pos = this.next_position(size_x, size_y);
    -
    -        var $w = $(html).attr({
    -                'data-col': next_pos.col,
    -                'data-row': next_pos.row,
    -                'data-sizex' : next_pos.size_x,
    -                'data-sizey' : next_pos.size_y
    -            }).addClass('gs_w').appendTo(this.$el).hide();
    -
    -        this.$widgets = this.$widgets.add($w);
    -
    -        this.register_widget($w);
    -
    -        this.set_dom_grid_height();
    -
    -        return $w.fadeIn();
    -    };
    -
    -
    -    /**
    -    * Get the most left column below to add a new widget.
    -    *
    -    * @method next_position
    -    * @param {Number} size_x The nº of rows the widget occupies horizontally.
    -    * @param {Number} size_y The nº of columns the widget occupies vertically.
    -    * @return {Object} Returns a grid coords object representing the future
    -    *  widget coords.
    -    */
    -    fn.next_position = function(size_x, size_y) {
    -        size_x || (size_x = 1);
    -        size_y || (size_y = 1);
    -        var ga = this.gridmap;
    -        var cols_l = ga.length;
    -        var valid_pos = [];
    -
    -        for (var c = 1; c < cols_l; c++) {
    -            var rows_l = ga[c].length;
    -            for (var r = 1; r <= rows_l; r++) {
    -                var can_move_to = this.can_move_to({
    -                    size_x: size_x,
    -                    size_y: size_y
    -                }, c, r);
    -
    -                if (can_move_to) {
    -                    valid_pos.push({
    -                        col: c,
    -                        row: r,
    -                        size_y: size_y,
    -                        size_x: size_x
    -                    });
    -                }
    -            }
    -        }
    -
    -        if (valid_pos.length) {
    -            return this.sort_by_row_and_col_asc(valid_pos)[0];
    -        }
    -        return false;
    -    };
    -
    -
    -    /**
    -    * Remove a widget from the grid.
    -    *
    -    * @method remove_widget
    -    * @param {HTMLElement} el The jQuery wrapped HTMLElement you want to remove.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.remove_widget = function(el, callback) {
    -        var $el = el instanceof jQuery ? el : $(el);
    -        var wgd = $el.coords().grid;
    -
    -        this.cells_occupied_by_placeholder = {};
    -        this.$widgets = this.$widgets.not($el);
    -
    -        var $nexts = this.widgets_below($el);
    -
    -        this.remove_from_gridmap(wgd);
    -
    -        $el.fadeOut($.proxy(function() {
    -            $el.remove();
    -
    -            $nexts.each($.proxy(function(i, widget) {
    -                this.move_widget_up( $(widget), wgd.size_y );
    -            }, this));
    -
    -            if (callback) {
    -                callback.call(this, el);
    -            }
    -        }, this));
    -    };
    -
    -
    -    /**
    -    * Returns a serialized array of the widgets in the grid.
    -    *
    -    * @method serialize
    -    * @param {HTMLElement} [$widgets] The collection of jQuery wrapped
    -    *  HTMLElements you want to serialize. If no argument is passed all widgets
    -    *  will be serialized.
    -    * @return {Array} Returns an Array of Objects with the data specified in
    -    *  the serialize_params option.
    -    */
    -    fn.serialize = function($widgets) {
    -        $widgets || ($widgets = this.$widgets);
    -        var result = [];
    -        $widgets.each($.proxy(function(i, widget) {
    -            result.push(this.options.serialize_params(
    -                $(widget), $(widget).coords().grid ) );
    -        }, this));
    -
    -        return result;
    -    };
    -
    -
    -    /**
    -    * Returns a serialized array of the widgets that have changed their
    -    *  position.
    -    *
    -    * @method serialize_changed
    -    * @return {Array} Returns an Array of Objects with the data specified in
    -    *  the serialize_params option.
    -    */
    -    fn.serialize_changed = function() {
    -        return this.serialize(this.$changed);
    -    };
    -
    -
    -    /**
    -    * Creates the grid coords object representing the widget a add it to the
    -    * mapped array of positions.
    -    *
    -    * @method register_widget
    -    * @return {Array} Returns the instance of the Gridster class.
    -    */
    -    fn.register_widget = function($el) {
    -
    -        var wgd = {
    -            'col': parseInt($el.attr('data-col'), 10),
    -            'row': parseInt($el.attr('data-row'), 10),
    -            'size_x': parseInt($el.attr('data-sizex'), 10),
    -            'size_y': parseInt($el.attr('data-sizey'), 10),
    -            'el': $el
    -        };
    -
    -        if (this.options.avoid_overlapped_widgets &&
    -            !this.can_move_to(
    -             {size_x: wgd.size_x, size_y: wgd.size_y}, wgd.col, wgd.row)
    -        ) {
    -            wgd = this.next_position(wgd.size_x, wgd.size_y);
    -            wgd.el = $el;
    -            $el.attr({
    -                'data-col': wgd.col,
    -                'data-row': wgd.row,
    -                'data-sizex': wgd.size_x,
    -                'data-sizey': wgd.size_y
    -            });
    -        }
    -
    -        // attach Coord object to player data-coord attribute
    -        $el.data('coords', $el.coords());
    -
    -        // Extend Coord object with grid position info
    -        $el.data('coords').grid = wgd;
    -
    -        this.add_to_gridmap(wgd, $el);
    -        this.widgets.push($el);
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Update in the mapped array of positions the value of cells represented by
    -    * the grid coords object passed in the `grid_data` param.
    -    *
    -    * @param {Object} grid_data The grid coords object representing the cells
    -    *  to update in the mapped array.
    -    * @param {HTMLElement|Boolean} value Pass `false` or the jQuery wrapped
    -    *  HTMLElement, depends if you want to delete an existing position or add
    -    *  a new one.
    -    * @method update_widget_position
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.update_widget_position = function(grid_data, value) {
    -        this.for_each_cell_occupied(grid_data, function(col, row) {
    -            if (!this.gridmap[col]) { return this; }
    -            this.gridmap[col][row] = value;
    -        });
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Remove a widget from the mapped array of positions.
    -    *
    -    * @method remove_from_gridmap
    -    * @param {Object} grid_data The grid coords object representing the cells
    -    *  to update in the mapped array.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.remove_from_gridmap = function(grid_data) {
    -        return this.update_widget_position(grid_data, false);
    -    };
    -
    -
    -    /**
    -    * Add a widget to the mapped array of positions.
    -    *
    -    * @method add_to_gridmap
    -    * @param {Object} grid_data The grid coords object representing the cells
    -    *  to update in the mapped array.
    -    * @param {HTMLElement|Boolean} value The value to set in the specified
    -    *  position .
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.add_to_gridmap = function(grid_data, value) {
    -        this.update_widget_position(grid_data, value || grid_data.el);
    -
    -        if (grid_data.el) {
    -            var $widgets = this.widgets_below(grid_data.el);
    -            $widgets.each($.proxy(function(i, widget) {
    -                this.move_widget_up( $(widget));
    -            }, this));
    -        }
    -    };
    -
    -
    -    /**
    -    * Make widgets draggable.
    -    *
    -    * @uses Draggable
    -    * @method draggable
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.draggable = function() {
    -        var self = this;
    -        var draggable_options = $.extend(true, {}, this.options.draggable, {
    -            offset_left: this.options.widget_margins[0],
    -            items: '.gs_w',
    -            start: function(event, ui) {
    -                self.$widgets.filter('.player-revert')
    -                    .removeClass('player-revert');
    -
    -                self.$player = $(this);
    -                self.$helper = self.options.draggable.helper === 'clone' ?
    -                    $(ui.helper) : self.$player;
    -                self.helper = !self.$helper.is(self.$player);
    -
    -                self.on_start_drag.call(self, event, ui);
    -                self.$el.trigger('gridster:dragstart');
    -            },
    -            stop: function(event, ui) {
    -                self.on_stop_drag.call(self, event, ui);
    -                self.$el.trigger('gridster:dragstop');
    -            },
    -            drag: throttle(function(event, ui) {
    -                self.on_drag.call(self, event, ui);
    -                self.$el.trigger('gridster:drag');
    -            }, 60)
    -          });
    -
    -        this.drag_api = this.$el.draggable(draggable_options).data('draggable');
    -        return this;
    -    };
    -
    -
    -    /**
    -    * This function is executed when the player begins to be dragged.
    -    *
    -    * @method on_start_drag
    -    * @param {Event} The original browser event
    -    * @param {Object} A prepared ui object.
    -    */
    -    fn.on_start_drag = function(event, ui) {
    -
    -        this.$helper.add(this.$player).add(this.$wrapper).addClass('dragging');
    -
    -        this.$player.addClass('player');
    -        this.player_grid_data = this.$player.coords().grid;
    -        this.placeholder_grid_data = $.extend({}, this.player_grid_data);
    -
    -        //set new grid height along the dragging period
    -        this.$el.css('height', this.$el.height() +
    -          (this.player_grid_data.size_y * this.min_widget_height));
    -
    -        var colliders = this.faux_grid;
    -        var coords = this.$player.data('coords').coords;
    -
    -        this.cells_occupied_by_player = this.get_cells_occupied(
    -            this.player_grid_data);
    -        this.cells_occupied_by_placeholder = this.get_cells_occupied(
    -            this.placeholder_grid_data);
    -
    -        this.last_cols = [];
    -        this.last_rows = [];
    -
    -
    -        // see jquery.collision.js
    -        this.collision_api = this.$helper.collision(
    -            colliders, this.options.collision);
    -
    -        this.$preview_holder = $('<li />', {
    -              'class': 'preview-holder',
    -              'data-row': this.$player.attr('data-row'),
    -              'data-col': this.$player.attr('data-col'),
    -              css: {
    -                  width: coords.width,
    -                  height: coords.height
    -              }
    -        }).appendTo(this.$el);
    -
    -        if (this.options.draggable.start) {
    -          this.options.draggable.start.call(this, event, ui);
    -        }
    -    };
    -
    -
    -    /**
    -    * This function is executed when the player is being dragged.
    -    *
    -    * @method on_drag
    -    * @param {Event} The original browser event
    -    * @param {Object} A prepared ui object.
    -    */
    -    fn.on_drag = function(event, ui) {
    -        var abs_offset = {
    -            left: ui.position.left + this.baseX,
    -            top: ui.position.top + this.baseY
    -        };
    -
    -        this.colliders_data = this.collision_api.get_closest_colliders(
    -            abs_offset);
    -
    -        this.on_overlapped_column_change(
    -            this.on_start_overlapping_column,
    -            this.on_stop_overlapping_column
    -        );
    -
    -        this.on_overlapped_row_change(
    -            this.on_start_overlapping_row,
    -            this.on_stop_overlapping_row
    -        );
    -
    -        if (this.helper && this.$player) {
    -            this.$player.css({
    -                'left': ui.position.left,
    -                'top': ui.position.top
    -            });
    -        }
    -
    -        if (this.options.draggable.drag) {
    -            this.options.draggable.drag.call(this, event, ui);
    -        }
    -    };
    -
    -    /**
    -    * This function is executed when the player stops being dragged.
    -    *
    -    * @method on_stop_drag
    -    * @param {Event} The original browser event
    -    * @param {Object} A prepared ui object.
    -    */
    -    fn.on_stop_drag = function(event, ui) {
    -        this.$helper.add(this.$player).add(this.$wrapper)
    -            .removeClass('dragging');
    -
    -        ui.position.left = ui.position.left + this.baseX;
    -        ui.position.top = ui.position.top + this.baseY;
    -        this.colliders_data = this.collision_api.get_closest_colliders(ui.position);
    -
    -        this.on_overlapped_column_change(
    -            this.on_start_overlapping_column,
    -            this.on_stop_overlapping_column
    -        );
    -
    -        this.on_overlapped_row_change(
    -            this.on_start_overlapping_row,
    -            this.on_stop_overlapping_row
    -        );
    -
    -        this.$player.addClass('player-revert').removeClass('player')
    -            .attr({
    -                'data-col': this.placeholder_grid_data.col,
    -                'data-row': this.placeholder_grid_data.row
    -            }).css({
    -                'left': '',
    -                'top': ''
    -            });
    -
    -        this.$changed = this.$changed.add(this.$player);
    -
    -        this.cells_occupied_by_player = this.get_cells_occupied(
    -            this.placeholder_grid_data);
    -        this.set_cells_player_occupies(
    -            this.placeholder_grid_data.col, this.placeholder_grid_data.row);
    -
    -        this.$player.coords().grid.row = this.placeholder_grid_data.row;
    -        this.$player.coords().grid.col = this.placeholder_grid_data.col;
    -
    -        this.$player = null;
    -
    -        this.$preview_holder.remove();
    -
    -        this.set_dom_grid_height();
    -
    -        if (this.options.draggable.stop) {
    -          this.options.draggable.stop.call(this, event, ui);
    -        }
    -    };
    -
    -
    -    /**
    -    * Executes the callbacks passed as arguments when a column begins to be
    -    * overlapped or stops being overlapped.
    -    *
    -    * @param {Function} start_callback Function executed when a new column
    -    *  begins to be overlapped. The column is passed as first argument.
    -    * @param {Function} stop_callback Function executed when a column stops
    -    *  being overlapped. The column is passed as first argument.
    -    * @method on_overlapped_column_change
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.on_overlapped_column_change = function(start_callback, stop_callback) {
    -        if (!this.colliders_data.length) {
    -            return;
    -        }
    -        var cols = this.get_targeted_columns(
    -            this.colliders_data[0].el.data.col);
    -
    -        var last_n_cols = this.last_cols.length;
    -        var n_cols = cols.length;
    -        var i;
    -
    -        for (i = 0; i < n_cols; i++) {
    -            if ($.inArray(cols[i], this.last_cols) === -1) {
    -                (start_callback || $.noop).call(this, cols[i]);
    -            }
    -        }
    -
    -        for (i = 0; i< last_n_cols; i++) {
    -            if ($.inArray(this.last_cols[i], cols) === -1) {
    -                (stop_callback || $.noop).call(this, this.last_cols[i]);
    -            }
    -        }
    -
    -        this.last_cols = cols;
    -
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Executes the callbacks passed as arguments when a row starts to be
    -    * overlapped or stops being overlapped.
    -    *
    -    * @param {Function} start_callback Function executed when a new row begins
    -    *  to be overlapped. The row is passed as first argument.
    -    * @param {Function} stop_callback Function executed when a row stops being
    -    *  overlapped. The row is passed as first argument.
    -    * @method on_overlapped_row_change
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.on_overlapped_row_change = function(start_callback, end_callback) {
    -        if (!this.colliders_data.length) {
    -            return;
    -        }
    -        var rows = this.get_targeted_rows(this.colliders_data[0].el.data.row);
    -        var last_n_rows = this.last_rows.length;
    -        var n_rows = rows.length;
    -        var i;
    -
    -        for (i = 0; i < n_rows; i++) {
    -            if ($.inArray(rows[i], this.last_rows) === -1) {
    -                (start_callback || $.noop).call(this, rows[i]);
    -            }
    -        }
    -
    -        for (i = 0; i < last_n_rows; i++) {
    -            if ($.inArray(this.last_rows[i], rows) === -1) {
    -                (end_callback || $.noop).call(this, this.last_rows[i]);
    -            }
    -        }
    -
    -        this.last_rows = rows;
    -    };
    -
    -
    -    /**
    -    * Sets the current position of the player
    -    *
    -    * @param {Function} start_callback Function executed when a new row begins
    -    *  to be overlapped. The row is passed as first argument.
    -    * @param {Function} stop_callback Function executed when a row stops being
    -    *  overlapped. The row is passed as first argument.
    -    * @method set_player
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.set_player = function(col, row) {
    -        this.empty_cells_player_occupies();
    -
    -        var self = this;
    -        var cell = self.colliders_data[0].el.data;
    -        var to_col = cell.col;
    -        var to_row = row || cell.row;
    -
    -        this.player_grid_data = {
    -            col: to_col,
    -            row: to_row,
    -            size_y : this.player_grid_data.size_y,
    -            size_x : this.player_grid_data.size_x
    -        };
    -
    -        this.cells_occupied_by_player = this.get_cells_occupied(
    -            this.player_grid_data);
    -
    -        var $overlapped_widgets = this.get_widgets_overlapped(
    -            this.player_grid_data);
    -
    -        var constraints = this.widgets_constraints($overlapped_widgets);
    -
    -        this.manage_movements(constraints.can_go_up, to_col, to_row);
    -        this.manage_movements(constraints.can_not_go_up, to_col, to_row);
    -
    -        /* if there is not widgets overlapping in the new player position,
    -         * update the new placeholder position. */
    -        if (!$overlapped_widgets.length) {
    -            var pp = this.can_go_player_up(this.player_grid_data);
    -            if (pp !== false) {
    -                to_row = pp;
    -            }
    -            this.set_placeholder(to_col, to_row);
    -        }
    -
    -        return {
    -            col: to_col,
    -            row: to_row
    -        };
    -    };
    -
    -
    -    /**
    -    * See which of the widgets in the $widgets param collection can go to
    -    * a upper row and which not.
    -    *
    -    * @method widgets_contraints
    -    * @param {HTMLElements} $widgets A jQuery wrapped collection of
    -    * HTMLElements.
    -    * @return {Array} Returns a literal Object with two keys: `can_go_up` &
    -    * `can_not_go_up`. Each contains a set of HTMLElements.
    -    */
    -    fn.widgets_constraints = function($widgets) {
    -        var $widgets_can_go_up = $([]);
    -        var $widgets_can_not_go_up;
    -        var wgd_can_go_up = [];
    -        var wgd_can_not_go_up = [];
    -
    -        $widgets.each($.proxy(function(i, w) {
    -            var $w = $(w);
    -            var wgd = $w.coords().grid;
    -            if (this.can_go_widget_up(wgd)) {
    -                $widgets_can_go_up = $widgets_can_go_up.add($w);
    -                wgd_can_go_up.push(wgd);
    -            }else{
    -                wgd_can_not_go_up.push(wgd);
    -            }
    -        }, this));
    -
    -        $widgets_can_not_go_up = $widgets.not($widgets_can_go_up);
    -
    -        return {
    -            can_go_up: this.sort_by_row_asc(wgd_can_go_up),
    -            can_not_go_up: this.sort_by_row_desc(wgd_can_not_go_up)
    -        };
    -    };
    -
    -
    -    /**
    -    * Sorts an Array of grid coords objects (representing the grid coords of
    -    * each widget) in ascending way.
    -    *
    -    * @method sort_by_row_asc
    -    * @param {Array} widgets Array of grid coords objects
    -    * @return {Array} Returns the array sorted.
    -    */
    -    fn.sort_by_row_asc = function(widgets) {
    -        widgets = widgets.sort(function(a, b) {
    -           if (a.row > b.row) {
    -               return 1;
    -           }
    -           return -1;
    -        });
    -
    -        return widgets;
    -    };
    -
    -
    -    /**
    -    * Sorts an Array of grid coords objects (representing the grid coords of
    -    * each widget) placing first the empty cells upper left.
    -    *
    -    * @method sort_by_row_and_col_asc
    -    * @param {Array} widgets Array of grid coords objects
    -    * @return {Array} Returns the array sorted.
    -    */
    -    fn.sort_by_row_and_col_asc = function(widgets) {
    -        widgets = widgets.sort(function(a, b) {
    -           if (a.row > b.row || a.row == b.row && a.col > b.col) {
    -               return 1;
    -           }
    -           return -1;
    -        });
    -
    -        return widgets;
    -    };
    -
    -
    -    /**
    -    * Sorts an Array of grid coords objects by column (representing the grid
    -    * coords of each widget) in ascending way.
    -    *
    -    * @method sort_by_col_asc
    -    * @param {Array} widgets Array of grid coords objects
    -    * @return {Array} Returns the array sorted.
    -    */
    -    fn.sort_by_col_asc = function(widgets) {
    -        widgets = widgets.sort(function(a, b) {
    -           if (a.col > b.col) {
    -               return 1;
    -           }
    -           return -1;
    -        });
    -
    -        return widgets;
    -    };
    -
    -
    -    /**
    -    * Sorts an Array of grid coords objects (representing the grid coords of
    -    * each widget) in descending way.
    -    *
    -    * @method sort_by_row_desc
    -    * @param {Array} widgets Array of grid coords objects
    -    * @return {Array} Returns the array sorted.
    -    */
    -    fn.sort_by_row_desc = function(widgets) {
    -        widgets = widgets.sort(function(a, b) {
    -            if (a.row + a.size_y < b.row + b.size_y) {
    -                return 1;
    -            }
    -           return -1;
    -        });
    -        return widgets;
    -    };
    -
    -
    -    /**
    -    * Sorts an Array of grid coords objects (representing the grid coords of
    -    * each widget) in descending way.
    -    *
    -    * @method manage_movements
    -    * @param {HTMLElements} $widgets A jQuery collection of HTMLElements
    -    *  representing the widgets you want to move.
    -    * @param {Number} to_col The column to which we want to move the widgets.
    -    * @param {Number} to_row The row to which we want to move the widgets.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.manage_movements = function($widgets, to_col, to_row) {
    -        $.each($widgets, $.proxy(function(i, w) {
    -            var wgd = w;
    -            var $w = wgd.el;
    -
    -            var can_go_widget_up = this.can_go_widget_up(wgd);
    -
    -            if (can_go_widget_up) {
    -                //target CAN go up
    -                //so move widget up
    -                this.move_widget_to($w, can_go_widget_up);
    -                this.set_placeholder(to_col, can_go_widget_up + wgd.size_y);
    -
    -            } else {
    -                //target can't go up
    -                var can_go_player_up = this.can_go_player_up(
    -                    this.player_grid_data);
    -
    -                if (!can_go_player_up) {
    -                    // target can't go up
    -                    // player cant't go up
    -                    // so we need to move widget down to a position that dont
    -                    // overlaps player
    -                    var y = (to_row + this.player_grid_data.size_y) - wgd.row;
    -
    -                    this.move_widget_down($w, y);
    -                    this.set_placeholder(to_col, to_row);
    -                }
    -            }
    -        }, this));
    -
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Determines if there is a widget in the row and col given. Or if the
    -    * HTMLElement passed as first argument is the player.
    -    *
    -    * @method is_player
    -    * @param {Number|HTMLElement} col_or_el A jQuery wrapped collection of
    -    * HTMLElements.
    -    * @param {Number} [row] The column to which we want to move the widgets.
    -    * @return {Boolean} Returns true or false.
    -    */
    -    fn.is_player = function(col_or_el, row) {
    -        if (row && !this.gridmap[col_or_el]) { return false; }
    -        var $w = row ? this.gridmap[col_or_el][row] : col_or_el;
    -        return $w && ($w.is(this.$player) || $w.is(this.$helper));
    -    };
    -
    -
    -    /**
    -    * Determines if the widget that is being dragged is currently over the row
    -    * and col given.
    -    *
    -    * @method is_player_in
    -    * @param {Number} col The column to check.
    -    * @param {Number} row The row to check.
    -    * @return {Boolean} Returns true or false.
    -    */
    -    fn.is_player_in = function(col, row) {
    -        var c = this.cells_occupied_by_player;
    -        return $.inArray(col, c.cols) >= 0 && $.inArray(row, c.rows) >= 0;
    -    };
    -
    -
    -    /**
    -    * Determines if the placeholder is currently over the row and col given.
    -    *
    -    * @method is_placeholder_in
    -    * @param {Number} col The column to check.
    -    * @param {Number} row The row to check.
    -    * @return {Boolean} Returns true or false.
    -    */
    -    fn.is_placeholder_in = function(col, row) {
    -        var c = this.cells_occupied_by_placeholder || {};
    -        return this.is_placeholder_in_col(col) && $.inArray(row, c.rows) >= 0;
    -    };
    -
    -
    -    /**
    -    * Determines if the placeholder is currently over the column given.
    -    *
    -    * @method is_placeholder_in_col
    -    * @param {Number} col The column to check.
    -    * @return {Boolean} Returns true or false.
    -    */
    -    fn.is_placeholder_in_col = function(col) {
    -        var c = this.cells_occupied_by_placeholder || [];
    -        return $.inArray(col, c.cols) >= 0;
    -    };
    -
    -
    -    /**
    -    * Determines if the cell represented by col and row params is empty.
    -    *
    -    * @method is_empty
    -    * @param {Number} col The column to check.
    -    * @param {Number} row The row to check.
    -    * @return {Boolean} Returns true or false.
    -    */
    -    fn.is_empty = function(col, row) {
    -        if (typeof this.gridmap[col] !== 'undefined' &&
    -            typeof this.gridmap[col][row] !== 'undefined' &&
    -            this.gridmap[col][row] === false
    -        ) {
    -            return true;
    -        }
    -        return false;
    -    };
    -
    -
    -    /**
    -    * Determines if the cell represented by col and row params is occupied.
    -    *
    -    * @method is_occupied
    -    * @param {Number} col The column to check.
    -    * @param {Number} row The row to check.
    -    * @return {Boolean} Returns true or false.
    -    */
    -    fn.is_occupied = function(col, row) {
    -        if (!this.gridmap[col]) {
    -            return false;
    -        }
    -
    -        if (this.gridmap[col][row]) {
    -            return true;
    -        }
    -        return false;
    -    };
    -
    -
    -    /**
    -    * Determines if there is a widget in the cell represented by col/row params.
    -    *
    -    * @method is_widget
    -    * @param {Number} col The column to check.
    -    * @param {Number} row The row to check.
    -    * @return {Boolean|HTMLElement} Returns false if there is no widget,
    -    * else returns the jQuery HTMLElement
    -    */
    -    fn.is_widget = function(col, row) {
    -        var cell = this.gridmap[col];
    -        if (!cell) {
    -            return false;
    -        }
    -
    -        cell = cell[row];
    -
    -        if (cell) {
    -            return cell;
    -        }
    -
    -        return false;
    -    };
    -
    -
    -    /**
    -    * Determines if there is a widget in the cell represented by col/row
    -    * params and if this is under the widget that is being dragged.
    -    *
    -    * @method is_widget_under_player
    -    * @param {Number} col The column to check.
    -    * @param {Number} row The row to check.
    -    * @return {Boolean} Returns true or false.
    -    */
    -    fn.is_widget_under_player = function(col, row) {
    -        if (this.is_widget(col, row)) {
    -            return this.is_player_in(col, row);
    -        }
    -        return false;
    -    };
    -
    -
    -    /**
    -    * Get widgets overlapping with the player.
    -    *
    -    * @method get_widgets_under_player
    -    * @return {HTMLElement} Returns a jQuery collection of HTMLElements
    -    */
    -    fn.get_widgets_under_player = function() {
    -        var cells = this.cells_occupied_by_player;
    -        var $widgets = $([]);
    -
    -        $.each(cells.cols, $.proxy(function(i, col) {
    -            $.each(cells.rows, $.proxy(function(i, row) {
    -                if(this.is_widget(col, row)) {
    -                    $widgets = $widgets.add(this.gridmap[col][row]);
    -                }
    -            }, this));
    -        }, this));
    -
    -        return $widgets;
    -    };
    -
    -
    -    /**
    -    * Put placeholder at the row and column specified.
    -    *
    -    * @method set_placeholder
    -    * @param {Number} col The column to which we want to move the
    -    *  placeholder.
    -    * @param {Number} row The row to which we want to move the
    -    *  placeholder.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.set_placeholder = function(col, row) {
    -        var phgd = $.extend({}, this.placeholder_grid_data);
    -        var $nexts = this.widgets_below({
    -                col: phgd.col,
    -                row: phgd.row,
    -                size_y: phgd.size_y,
    -                size_x: phgd.size_x
    -            });
    -
    -        //Prevents widgets go out of the grid
    -        var right_col = (col + phgd.size_x - 1);
    -        if (right_col > this.cols) {
    -            col = col - (right_col - col);
    -        }
    -
    -        var moved_down = this.placeholder_grid_data.row < row;
    -        var changed_column = this.placeholder_grid_data.col !== col;
    -
    -        this.placeholder_grid_data.col = col;
    -        this.placeholder_grid_data.row = row;
    -
    -        this.cells_occupied_by_placeholder = this.get_cells_occupied(
    -            this.placeholder_grid_data);
    -
    -        this.$preview_holder.attr({
    -            'data-row' : row,
    -            'data-col' : col
    -        });
    -
    -        if (moved_down || changed_column) {
    -            $nexts.each($.proxy(function(i, widget) {
    -                this.move_widget_up(
    -                 $(widget), this.placeholder_grid_data.col - col + phgd.size_y);
    -            }, this));
    -        }
    -
    -    };
    -
    -
    -    /**
    -    * Determines whether the player can move to a position above.
    -    *
    -    * @method can_go_player_up
    -    * @param {Object} widget_grid_data The actual grid coords object of the
    -    *  player.
    -    * @return {Number|Boolean} If the player can be moved to an upper row
    -    *  returns the row number, else returns false.
    -    */
    -    fn.can_go_player_up = function(widget_grid_data) {
    -        var p_bottom_row = widget_grid_data.row + widget_grid_data.size_y - 1;
    -        var result = true;
    -        var upper_rows = [];
    -        var min_row = 10000;
    -        var $widgets_under_player = this.get_widgets_under_player();
    -
    -        /* generate an array with columns as index and array with upper rows
    -         * empty as value */
    -        this.for_each_column_occupied(widget_grid_data, function(tcol) {
    -            var grid_col = this.gridmap[tcol];
    -            var r = p_bottom_row + 1;
    -            upper_rows[tcol] = [];
    -
    -            while (--r > 0) {
    -                if (this.is_empty(tcol, r) || this.is_player(tcol, r) ||
    -                    this.is_widget(tcol, r) &&
    -                    grid_col[r].is($widgets_under_player)
    -                ) {
    -                    upper_rows[tcol].push(r);
    -                    min_row = r < min_row ? r : min_row;
    -                }else{
    -                    break;
    -                }
    -            }
    -
    -            if (upper_rows[tcol].length === 0) {
    -                result = false;
    -                return true; //break
    -            }
    -
    -            upper_rows[tcol].sort();
    -        });
    -
    -        if (!result) { return false; }
    -
    -        return this.get_valid_rows(widget_grid_data, upper_rows, min_row);
    -    };
    -
    -
    -    /**
    -    * Determines whether a widget can move to a position above.
    -    *
    -    * @method can_go_widget_up
    -    * @param {Object} widget_grid_data The actual grid coords object of the
    -    *  widget we want to check.
    -    * @return {Number|Boolean} If the widget can be moved to an upper row
    -    *  returns the row number, else returns false.
    -    */
    -    fn.can_go_widget_up = function(widget_grid_data) {
    -        var p_bottom_row = widget_grid_data.row + widget_grid_data.size_y - 1;
    -        var result = true;
    -        var upper_rows = [];
    -        var min_row = 10000;
    -
    -        /* generate an array with columns as index and array with upper rows
    -         * empty as value */
    -        this.for_each_column_occupied(widget_grid_data, function(tcol) {
    -            var grid_col = this.gridmap[tcol];
    -            upper_rows[tcol] = [];
    -
    -            var r = p_bottom_row + 1;
    -
    -            while (--r > 0) {
    -                if (this.is_occupied(tcol, r) && !this.is_player(tcol, r)) {
    -                    break;
    -                }
    -
    -                if (!this.is_player(tcol, r) &&
    -                    !this.is_placeholder_in(tcol, r)
    -                ) {
    -                    upper_rows[tcol].push(r);
    -                }
    -
    -                if (r < min_row ) {
    -                    min_row = r;
    -                }
    -            }
    -
    -            if (upper_rows[tcol].length === 0) {
    -                result = false;
    -                return true; //break
    -            }
    -
    -            upper_rows[tcol].sort();
    -        });
    -
    -        if (!result) { return false; }
    -
    -        return this.get_valid_rows(widget_grid_data, upper_rows, min_row);
    -    };
    -
    -
    -    /**
    -    * Search a valid row for the widget represented by `widget_grid_data' in
    -    * the `upper_rows` array. Iteration starts from row specified in `min_row`.
    -    *
    -    * @method get_valid_rows
    -    * @param {Object} widget_grid_data The actual grid coords object of the
    -    *  player.
    -    * @param {Array} upper_rows An array with columns as index and arrays
    -    *  of valid rows as values.
    -    * @param {Number} min_row The upper row from which the iteration will start.
    -    * @return {Number|Boolean} Returns the upper row valid from the `upper_rows`
    -    *  for the widget in question.
    -    */
    -    fn.get_valid_rows = function(widget_grid_data, upper_rows, min_row) {
    -        var p_top_row = widget_grid_data.row;
    -        var p_bottom_row = widget_grid_data.row + widget_grid_data.size_y - 1;
    -        var size_y = widget_grid_data.size_y;
    -        var r = min_row - 1;
    -        var valid_rows = [];
    -
    -        while (++r <= p_bottom_row ) {
    -            var common = true;
    -            $.each(upper_rows, function(col, rows) {
    -                if (rows && $.inArray(r, rows) === -1) {
    -                    common = false;
    -                }
    -            });
    -
    -            if (common === true) {
    -                valid_rows.push(r);
    -                if (valid_rows.length === size_y) {
    -                    break;
    -                }
    -            }
    -        }
    -
    -        var new_row = false;
    -        if (size_y === 1) {
    -            if (valid_rows[0] !== p_top_row) {
    -                new_row = valid_rows[0] || false;
    -            }
    -        }else{
    -            if (valid_rows[0] !== p_top_row) {
    -                new_row = this.get_consecutive_numbers_index(
    -                    valid_rows, size_y);
    -            }
    -        }
    -
    -
    -        return new_row;
    -    };
    -
    -
    -    fn.get_consecutive_numbers_index = function(arr, size_y) {
    -        var max = arr.length;
    -        var result = [];
    -        var first = true;
    -        var prev = -1; // or null?
    -
    -        for (var i=0; i < max; i++) {
    -            if (first || arr[i] === prev + 1) {
    -                result.push(i);
    -                if (result.length === size_y) {
    -                    break;
    -                }
    -                first = false;
    -            }else{
    -                result = [];
    -                first = true;
    -            }
    -
    -            prev = arr[i];
    -        }
    -
    -        return result.length >= size_y ? arr[result[0]] : false;
    -    };
    -
    -
    -    /**
    -    * Get widgets overlapping with the player.
    -    *
    -    * @method get_widgets_overlapped
    -    * @return {HTMLElements} Returns a jQuery collection of HTMLElements.
    -    */
    -    fn.get_widgets_overlapped = function() {
    -        var $w;
    -        var $widgets = $([]);
    -        var used = [];
    -        var rows_from_bottom = this.cells_occupied_by_player.rows.slice(0);
    -        rows_from_bottom.reverse();
    -
    -        $.each(this.cells_occupied_by_player.cols, $.proxy(function(i, col) {
    -            $.each(rows_from_bottom, $.proxy(function(i, row) {
    -                // if there is a widget in the player position
    -                if (!this.gridmap[col]) { return true; } //next iteration
    -                var $w = this.gridmap[col][row];
    -
    -                if (this.is_occupied(col, row) && !this.is_player($w) &&
    -                    $.inArray($w, used) === -1
    -                ) {
    -                    $widgets = $widgets.add($w);
    -                    used.push($w);
    -                }
    -
    -            }, this));
    -        }, this));
    -
    -        return $widgets;
    -    };
    -
    -
    -    /**
    -    * This callback is executed when the player begins to collide with a column.
    -    *
    -    * @method on_start_overlapping_column
    -    * @param {Number} col The collided column.
    -    * @return {HTMLElements} Returns a jQuery collection of HTMLElements.
    -    */
    -    fn.on_start_overlapping_column = function(col) {
    -        this.set_player(col, false);
    -    };
    -
    -
    -    /**
    -    * A callback executed when the player begins to collide with a row.
    -    *
    -    * @method on_start_overlapping_row
    -    * @param {Number} col The collided row.
    -    * @return {HTMLElements} Returns a jQuery collection of HTMLElements.
    -    */
    -    fn.on_start_overlapping_row = function(row) {
    -        this.set_player(false, row);
    -    };
    -
    -
    -    /**
    -    * A callback executed when the the player ends to collide with a column.
    -    *
    -    * @method on_stop_overlapping_column
    -    * @param {Number} col The collided row.
    -    * @return {HTMLElements} Returns a jQuery collection of HTMLElements.
    -    */
    -    fn.on_stop_overlapping_column = function(col) {
    -        this.set_player();
    -
    -        var self = this;
    -        this.for_each_widget_below(col, this.cells_occupied_by_player.rows[0],
    -            function(tcol, trow) {
    -                self.move_widget_up(this, self.player_grid_data.size_y);
    -        });
    -    };
    -
    -
    -    /**
    -    * This callback is executed when the player ends to collide with a row.
    -    *
    -    * @method on_stop_overlapping_row
    -    * @param {Number} row The collided row.
    -    * @return {HTMLElements} Returns a jQuery collection of HTMLElements.
    -    */
    -    fn.on_stop_overlapping_row = function(row) {
    -        this.set_player();
    -
    -        var self = this;
    -        var cols = this.cells_occupied_by_player.cols;
    -        for (var c = 0, cl = cols.length; c < cl; c++) {
    -            this.for_each_widget_below(cols[c], row, function(tcol, trow) {
    -                self.move_widget_up(this, self.player_grid_data.size_y);
    -            });
    -        }
    -    };
    -
    -
    -    /**
    -    * Move a widget to a specific row. The cell or cells must be empty.
    -    * If the widget has widgets below, all of these widgets will be moved also
    -    * if they can.
    -    *
    -    * @method move_widget_to
    -    * @param {HTMLElement} $widget The jQuery wrapped HTMLElement of the
    -    * widget is going to be moved.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.move_widget_to = function($widget, row) {
    -        var self = this;
    -        var widget_grid_data = $widget.coords().grid;
    -        var diff = row - widget_grid_data.row;
    -        var $next_widgets = this.widgets_below($widget);
    -
    -        var can_move_to_new_cell = this.can_move_to(
    -            widget_grid_data, widget_grid_data.col, row, $widget);
    -
    -        if (can_move_to_new_cell === false) {
    -            return false;
    -        }
    -
    -        this.remove_from_gridmap(widget_grid_data);
    -        widget_grid_data.row = row;
    -        this.add_to_gridmap(widget_grid_data);
    -        $widget.attr('data-row', row);
    -        this.$changed = this.$changed.add($widget);
    -
    -
    -        $next_widgets.each(function(i, widget) {
    -            var $w = $(widget);
    -            var wgd = $w.coords().grid;
    -            var can_go_up = self.can_go_widget_up(wgd);
    -
    -            if (can_go_up && can_go_up !== wgd.row) {
    -                self.move_widget_to($w, can_go_up);
    -            }
    -        });
    -
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Move up the specified widget and all below it.
    -    *
    -    * @method move_widget_up
    -    * @param {HTMLElement} $widget The widget you want to move.
    -    * @param {Number} [y_units] The number of cells that the widget has to move.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.move_widget_up = function($widget, y_units) {
    -        var el_grid_data = $widget.coords().grid;
    -        var actual_row = el_grid_data.row;
    -        var moved = [];
    -        var can_go_up = true;
    -        y_units || (y_units = 1);
    -
    -        if (!this.can_go_up($widget)) { return false; } //break;
    -
    -        this.for_each_column_occupied(el_grid_data, function(col) {
    -            // can_go_up
    -            if ($.inArray($widget, moved) === -1) {
    -                var widget_grid_data = $widget.coords().grid;
    -                var next_row = actual_row - y_units;
    -                next_row = this.can_go_up_to_row(
    -                    widget_grid_data, col, next_row);
    -
    -                if (!next_row) {
    -                    return true;
    -                }
    -
    -                var $next_widgets = this.widgets_below($widget);
    -
    -                this.remove_from_gridmap(widget_grid_data);
    -                widget_grid_data.row = next_row;
    -                this.add_to_gridmap(widget_grid_data);
    -                $widget.attr('data-row', widget_grid_data.row);
    -                this.$changed = this.$changed.add($widget);
    -
    -                moved.push($widget);
    -
    -                $next_widgets.each($.proxy(function(i, widget) {
    -                    this.move_widget_up($(widget), y_units);
    -                }, this));
    -            }
    -        });
    -
    -    };
    -
    -
    -    /**
    -    * Move down the specified widget and all below it.
    -    *
    -    * @method move_widget_down
    -    * @param {HTMLElement} $widget The jQuery object representing the widget
    -    *  you want to move.
    -    * @param {Number} The number of cells that the widget has to move.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.move_widget_down = function($widget, y_units) {
    -        var el_grid_data = $widget.coords().grid;
    -        var actual_row = el_grid_data.row;
    -        var moved = [];
    -        var y_diff = y_units;
    -
    -        if (!$widget) { return false; }
    -
    -        if ($.inArray($widget, moved) === -1) {
    -
    -            var widget_grid_data = $widget.coords().grid;
    -            var next_row = actual_row + y_units;
    -            var $next_widgets = this.widgets_below($widget);
    -
    -            this.remove_from_gridmap(widget_grid_data);
    -
    -            $next_widgets.each($.proxy(function(i, widget) {
    -                var $w = $(widget);
    -                var wd = $w.coords().grid;
    -                var tmp_y = this.displacement_diff(
    -                             wd, widget_grid_data, y_diff);
    -
    -                if (tmp_y > 0) {
    -                    this.move_widget_down($w, tmp_y);
    -                }
    -            }, this));
    -
    -            widget_grid_data.row = next_row;
    -            this.update_widget_position(widget_grid_data, $widget);
    -            $widget.attr('data-row', widget_grid_data.row);
    -            this.$changed = this.$changed.add($widget);
    -
    -            moved.push($widget);
    -        }
    -    };
    -
    -
    -    /**
    -    * Check if the widget can move to the specified row, else returns the
    -    * upper row possible.
    -    *
    -    * @method can_go_up_to_row
    -    * @param {Number} widget_grid_data The current grid coords object of the
    -    *  widget.
    -    * @param {Number} col The target column.
    -    * @param {Number} row The target row.
    -    * @return {Boolean|Number} Returns the row number if the widget can move
    -    *  to the target position, else returns false.
    -    */
    -    fn.can_go_up_to_row = function(widget_grid_data, col, row) {
    -        var ga = this.gridmap;
    -        var result = true;
    -        var urc = []; // upper_rows_in_columns
    -        var actual_row = widget_grid_data.row;
    -        var r;
    -
    -        /* generate an array with columns as index and array with
    -         * upper rows empty in the column */
    -        this.for_each_column_occupied(widget_grid_data, function(tcol) {
    -            var grid_col = ga[tcol];
    -            urc[tcol] = [];
    -
    -            r = actual_row;
    -            while (r--) {
    -                if (this.is_empty(tcol, r) &&
    -                    !this.is_placeholder_in(tcol, r)
    -                ) {
    -                    urc[tcol].push(r);
    -                }else{
    -                    break;
    -                }
    -            }
    -
    -            if (!urc[tcol].length) {
    -                result = false;
    -                return true;
    -            }
    -
    -        });
    -
    -        if (!result) { return false; }
    -
    -        /* get common rows starting from upper position in all the columns
    -         * that widget occupies */
    -        r = row;
    -        for (r = 1; r < actual_row; r++) {
    -            var common = true;
    -
    -            for (var uc = 0, ucl = urc.length; uc < ucl; uc++) {
    -                if (urc[uc] && $.inArray(r, urc[uc]) === -1) {
    -                    common = false;
    -                }
    -            }
    -
    -            if (common === true) {
    -                result = r;
    -                break;
    -            }
    -        }
    -
    -        return result;
    -    };
    -
    -
    -    fn.displacement_diff = function(widget_grid_data, parent_bgd, y_units) {
    -        var actual_row = widget_grid_data.row;
    -        var diffs = [];
    -        var parent_max_y = parent_bgd.row + parent_bgd.size_y;
    -
    -        this.for_each_column_occupied(widget_grid_data, function(col) {
    -            var temp_y_units = 0;
    -
    -            for (var r = parent_max_y; r < actual_row; r++) {
    -                if (this.is_empty(col, r)) {
    -                    temp_y_units = temp_y_units + 1;
    -                }
    -            }
    -
    -            diffs.push(temp_y_units);
    -        });
    -
    -        var max_diff = Math.max.apply(Math, diffs);
    -        y_units = (y_units - max_diff);
    -
    -        return y_units > 0 ? y_units : 0;
    -    };
    -
    -
    -    /**
    -    * Get widgets below a widget.
    -    *
    -    * @method widgets_below
    -    * @param {HTMLElement} $el The jQuery wrapped HTMLElement.
    -    * @return {HTMLElements} A jQuery collection of HTMLElements.
    -    */
    -    fn.widgets_below = function($el) {
    -        var el_grid_data = $.isPlainObject($el) ? $el : $el.coords().grid;
    -        var self = this;
    -        var ga = this.gridmap;
    -        var next_row = el_grid_data.row + el_grid_data.size_y - 1;
    -        var $nexts = $([]);
    -
    -        this.for_each_column_occupied(el_grid_data, function(col) {
    -            self.for_each_widget_below(col, next_row,
    -                function(tcol, trow) {
    -                    if (!self.is_player(this) &&
    -                        $.inArray(this, $nexts) === -1) {
    -                            $nexts = $nexts.add(this);
    -                            return true; // break
    -                    }
    -                });
    -        });
    -
    -        return this.sort_by_row_asc($nexts);
    -    };
    -
    -
    -    /**
    -    * Update the array of mapped positions with the new player position.
    -    *
    -    * @method set_cells_player_occupies
    -    * @param {Number} col The new player col.
    -    * @param {Number} col The new player row.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.set_cells_player_occupies = function(col, row) {
    -        this.remove_from_gridmap(this.placeholder_grid_data);
    -        this.placeholder_grid_data.col = col;
    -        this.placeholder_grid_data.row = row;
    -        this.add_to_gridmap(this.placeholder_grid_data, this.$player);
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Remove from the array of mapped positions the reference to the player.
    -    *
    -    * @method empty_cells_player_occupies
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.empty_cells_player_occupies = function() {
    -        this.remove_from_gridmap(this.placeholder_grid_data);
    -        return this;
    -    };
    -
    -
    -    fn.can_go_up = function($el) {
    -        var el_grid_data = $el.coords().grid;
    -        var initial_row = el_grid_data.row;
    -        var prev_row = initial_row - 1;
    -        var ga = this.gridmap;
    -        var upper_rows_by_column = [];
    -
    -        var result = true;
    -        if (initial_row === 1) { return false; }
    -
    -        this.for_each_column_occupied(el_grid_data, function(col) {
    -            var $w = this.is_widget(col, prev_row);
    -            if (this.is_occupied(col, prev_row) ||
    -                this.is_player(col, prev_row) ||
    -                this.is_placeholder_in(col, prev_row)
    -            ) {
    -                result = false;
    -                return true; //break
    -            }
    -        });
    -
    -        return result;
    -    };
    -
    -
    -
    -    /**
    -    * Check if it's possible to move a widget to a specific col/row. It takes
    -    * into account the dimensions (`size_y` and `size_x` attrs. of the grid
    -    *  coords object) the widget occupies.
    -    *
    -    * @method can_move_to
    -    * @param {Object} widget_grid_data The grid coords object that represents
    -    *  the widget.
    -    * @param {Object} The col target col.
    -    * @param {Object} The row target row.
    -    * @return {Boolean} Returns true if all cells are empty, else return false.
    -    */
    -    fn.can_move_to = function(widget_grid_data, col, row) {
    -        var ga = this.gridmap;
    -        var $w = widget_grid_data.el;
    -        var future_wd = {
    -            size_y: widget_grid_data.size_y,
    -            size_x: widget_grid_data.size_x,
    -            col: col,
    -            row: row
    -        };
    -        var result = true;
    -
    -        //Prevents widgets go out of the grid
    -        var right_col = col + widget_grid_data.size_x - 1;
    -        if (right_col > this.cols) {
    -            return false;
    -        };
    -
    -        this.for_each_cell_occupied(future_wd, function(tcol, trow) {
    -            var $tw = this.is_widget(tcol, trow);
    -            if ($tw && (!widget_grid_data.el || $tw.is($w))) {
    -                result = false;
    -            }
    -        });
    -
    -        return result;
    -    };
    -
    -
    -    /**
    -    * Given the leftmost column returns all columns that are overlapping
    -    *  with the player.
    -    *
    -    * @method get_targeted_columns
    -    * @param {Number} [from_col] The leftmost column.
    -    * @return {Array} Returns an array with column numbers.
    -    */
    -    fn.get_targeted_columns = function(from_col) {
    -        var max = (from_col || this.player_grid_data.col) +
    -            (this.player_grid_data.size_x - 1);
    -        var cols = [];
    -        for (var col = from_col; col <= max; col++) {
    -            cols.push(col);
    -        }
    -        return cols;
    -    };
    -
    -
    -    /**
    -    * Given the upper row returns all rows that are overlapping with the player.
    -    *
    -    * @method get_targeted_rows
    -    * @param {Number} [from_row] The upper row.
    -    * @return {Array} Returns an array with row numbers.
    -    */
    -    fn.get_targeted_rows = function(from_row) {
    -        var max = (from_row || this.player_grid_data.row) +
    -            (this.player_grid_data.size_y - 1);
    -        var rows = [];
    -        for (var row = from_row; row <= max; row++) {
    -            rows.push(row);
    -        }
    -        return rows;
    -    };
    -
    -    /**
    -    * Get all columns and rows that a widget occupies.
    -    *
    -    * @method get_cells_occupied
    -    * @param {Object} el_grid_data The grid coords object of the widget.
    -    * @return {Object} Returns an object like `{ cols: [], rows: []}`.
    -    */
    -    fn.get_cells_occupied = function(el_grid_data) {
    -        var cells = { cols: [], rows: []};
    -        var i;
    -        if (arguments[1] instanceof jQuery) {
    -            el_grid_data = arguments[1].coords().grid;
    -        }
    -
    -        for (i = 0; i < el_grid_data.size_x; i++) {
    -            var col = el_grid_data.col + i;
    -            cells.cols.push(col);
    -        }
    -
    -        for (i = 0; i < el_grid_data.size_y; i++) {
    -            var row = el_grid_data.row + i;
    -            cells.rows.push(row);
    -        }
    -
    -        return cells;
    -    };
    -
    -
    -    /**
    -    * Iterate over the cells occupied by a widget executing a function for
    -    * each one.
    -    *
    -    * @method for_each_cell_occupied
    -    * @param {Object} el_grid_data The grid coords object that represents the
    -    *  widget.
    -    * @param {Function} callback The function to execute on each column
    -    *  iteration. Column and row are passed as arguments.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.for_each_cell_occupied = function(grid_data, callback) {
    -        this.for_each_column_occupied(grid_data, function(col) {
    -            this.for_each_row_occupied(grid_data, function(row) {
    -                callback.call(this, col, row);
    -            });
    -        });
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Iterate over the columns occupied by a widget executing a function for
    -    * each one.
    -    *
    -    * @method for_each_column_occupied
    -    * @param {Object} el_grid_data The grid coords object that represents
    -    *  the widget.
    -    * @param {Function} callback The function to execute on each column
    -    *  iteration. The column number is passed as first argument.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.for_each_column_occupied = function(el_grid_data, callback) {
    -        for (var i = 0; i < el_grid_data.size_x; i++) {
    -            var col = el_grid_data.col + i;
    -            callback.call(this, col, el_grid_data);
    -        }
    -    };
    -
    -
    -    /**
    -    * Iterate over the rows occupied by a widget executing a function for
    -    * each one.
    -    *
    -    * @method for_each_row_occupied
    -    * @param {Object} el_grid_data The grid coords object that represents
    -    *  the widget.
    -    * @param {Function} callback The function to execute on each column
    -    *  iteration. The row number is passed as first argument.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.for_each_row_occupied = function(el_grid_data, callback) {
    -        for (var i = 0; i < el_grid_data.size_y; i++) {
    -            var row = el_grid_data.row + i;
    -            callback.call(this, row, el_grid_data);
    -        }
    -    };
    -
    -
    -
    -    fn._traversing_widgets = function(type, direction, col, row, callback) {
    -        var ga = this.gridmap;
    -        if (!ga[col]) { return; }
    -
    -        var cr, max;
    -        var action = type + '/' + direction;
    -        if (arguments[2] instanceof jQuery) {
    -            var el_grid_data = arguments[2].coords().grid;
    -            col = el_grid_data.col;
    -            row = el_grid_data.row;
    -            callback = arguments[3];
    -        }
    -        var matched = [];
    -        var trow = row;
    -
    -
    -        var methods = {
    -            'for_each/above': function() {
    -                while (trow--) {
    -                    if (trow > 0 && this.is_widget(col, trow) &&
    -                        $.inArray(ga[col][trow], matched) === -1
    -                    ) {
    -                        cr = callback.call(ga[col][trow], col, trow);
    -                        matched.push(ga[col][trow]);
    -                        if (cr) { break; }
    -                    }
    -                }
    -            },
    -            'for_each/below': function() {
    -                for (trow = row + 1, max = ga[col].length; trow < max; trow++) {
    -                    if (this.is_widget(col, trow) &&
    -                        $.inArray(ga[col][trow], matched) === -1
    -                    ) {
    -                        cr = callback.call(ga[col][trow], col, trow);
    -                        matched.push(ga[col][trow]);
    -                        if (cr) { break; }
    -                    }
    -                }
    -            }
    -        };
    -
    -        if (methods[action]) {
    -            methods[action].call(this);
    -        }
    -    };
    -
    -
    -    /**
    -    * Iterate over each widget above the column and row specified.
    -    *
    -    * @method for_each_widget_above
    -    * @param {Number} col The column to start iterating.
    -    * @param {Number} row The row to start iterating.
    -    * @param {Function} callback The function to execute on each widget
    -    *  iteration. The value of `this` inside the function is the jQuery
    -    *  wrapped HTMLElement.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.for_each_widget_above = function(col, row, callback) {
    -        this._traversing_widgets('for_each', 'above', col, row, callback);
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Iterate over each widget below the column and row specified.
    -    *
    -    * @method for_each_widget_below
    -    * @param {Number} col The column to start iterating.
    -    * @param {Number} row The row to start iterating.
    -    * @param {Function} callback The function to execute on each widget
    -    *  iteration. The value of `this` inside the function is the jQuery wrapped
    -    *  HTMLElement.
    -    * @return {Class} Returns the instance of the Gridster Class.
    -    */
    -    fn.for_each_widget_below = function(col, row, callback) {
    -        this._traversing_widgets('for_each', 'below', col, row, callback);
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Returns the highest occupied cell in the grid.
    -    *
    -    * @method get_highest_occupied_cell
    -    * @return {Object} Returns an object with `col` and `row` numbers.
    -    */
    -    fn.get_highest_occupied_cell = function() {
    -        var r;
    -        var gm = this.gridmap;
    -        var rows = [];
    -        var row_in_col = [];
    -        for (var c = gm.length - 1; c >= 1; c--) {
    -            for (r = gm[c].length - 1; r >= 1; r--) {
    -                if (this.is_widget(c, r)) {
    -                    rows.push(r);
    -                    row_in_col[r] = c;
    -                    break;
    -                }
    -            }
    -        }
    -
    -        var highest_row = Math.max.apply(Math, rows);
    -
    -        this.highest_occupied_cell = {
    -            col: row_in_col[highest_row],
    -            row: highest_row
    -        };
    -
    -        return this.highest_occupied_cell;
    -    };
    -
    -
    -    fn.get_widgets_from = function(col, row) {
    -        var ga = this.gridmap;
    -        var $widgets = $();
    -
    -        if (col) {
    -            $widgets = $widgets.add(
    -                this.$widgets.filter(function() {
    -                    var tcol = $(this).attr('data-col');
    -                    return (tcol === col || tcol > col);
    -                })
    -            );
    -        }
    -
    -        if (row) {
    -            $widgets = $widgets.add(
    -                this.$widgets.filter(function() {
    -                    var trow = $(this).attr('data-row');
    -                    return (trow === row || trow > row);
    -                })
    -            );
    -        }
    -
    -        return $widgets;
    -    }
    -
    -
    -    /**
    -    * Set the current height of the parent grid.
    -    *
    -    * @method set_dom_grid_height
    -    * @return {Object} Returns the instance of the Gridster class.
    -    */
    -    fn.set_dom_grid_height = function() {
    -        var r = this.get_highest_occupied_cell().row;
    -        this.$el.css('height', r * this.min_widget_height);
    -        return this;
    -    };
    -
    -
    -    /**
    -    * It generates the neccessary styles to position the widgets.
    -    *
    -    * @method generate_stylesheet
    -    * @param {Number} rows Number of columns.
    -    * @param {Number} cols Number of rows.
    -    * @return {Object} Returns the instance of the Gridster class.
    -    */
    -    fn.generate_stylesheet = function(opts) {
    -        var styles = '';
    -        var extra_cells = 10;
    -        var max_size_y = 6;
    -        var max_size_x = 6;
    -        var i;
    -        var rules;
    -
    -        opts || (opts = {});
    -        opts.cols || (opts.cols = this.cols);
    -        opts.rows || (opts.rows = this.rows);
    -        opts.namespace || (opts.namespace = '');
    -        opts.widget_base_dimensions ||
    -            (opts.widget_base_dimensions = this.options.widget_base_dimensions);
    -        opts.widget_margins ||
    -            (opts.widget_margins = this.options.widget_margins);
    -        opts.min_widget_width = (opts.widget_margins[0] * 2) +
    -            opts.widget_base_dimensions[0];
    -        opts.min_widget_height = (opts.widget_margins[1] * 2) +
    -            opts.widget_base_dimensions[1];
    -
    -        var serialized_opts = $.param(opts);
    -        // don't duplicate stylesheets for the same configuration
    -        if ($.inArray(serialized_opts, Gridster.generated_stylesheets) >= 0) {
    -            return false;
    -        }
    -
    -        Gridster.generated_stylesheets.push(serialized_opts);
    -
    -        /* generate CSS styles for cols */
    -        for (i = opts.cols + extra_cells; i >= 0; i--) {
    -            styles += (opts.namespace + ' [data-col="'+ (i + 1) + '"] { left:' +
    -                ((i * opts.widget_base_dimensions[0]) +
    -                (i * opts.widget_margins[0]) +
    -                ((i + 1) * opts.widget_margins[0])) + 'px;} ');
    -        }
    -
    -        /* generate CSS styles for rows */
    -        for (i = opts.rows + extra_cells; i >= 0; i--) {
    -            styles += (opts.namespace + ' [data-row="' + (i + 1) + '"] { top:' +
    -                ((i * opts.widget_base_dimensions[1]) +
    -                (i * opts.widget_margins[1]) +
    -                ((i + 1) * opts.widget_margins[1]) ) + 'px;} ');
    -        }
    -
    -
    -        for (var y = 1; y < max_size_y; y++) {
    -            styles += (opts.namespace + ' [data-sizey="' + y + '"] { height:' +
    -                (y * opts.widget_base_dimensions[1] +
    -                (y - 1) * (opts.widget_margins[1] * 2)) + 'px;}');
    -        }
    -
    -        for (var x = 1; x < max_size_x; x++) {
    -            styles += (opts.namespace + ' [data-sizex="' + x + '"] { width:' +
    -                (x * opts.widget_base_dimensions[0] +
    -                (x - 1) * (opts.widget_margins[0] * 2)) + 'px;}');
    -        }
    -
    -        return this.add_style_tag(styles);
    -    };
    -
    -
    -    /**
    -    * Injects the given CSS as string to the head of the document.
    -    *
    -    * @method add_style_tag
    -    * @param {String} css The styles to apply.
    -    * @return {Object} Returns the instance of the Gridster class.
    -    */
    -    fn.add_style_tag = function(css) {
    -      var d = document;
    -      var tag = d.createElement('style');
    -
    -      d.getElementsByTagName('head')[0].appendChild(tag);
    -      tag.setAttribute('type', 'text/css');
    -
    -      if (tag.styleSheet) {
    -        tag.styleSheet.cssText = css;
    -      }else{
    -        tag.appendChild(document.createTextNode(css));
    -      }
    -      return this;
    -    };
    -
    -
    -    /**
    -    * Generates a faux grid to collide with it when a widget is dragged and
    -    * detect row or column that we want to go.
    -    *
    -    * @method generate_faux_grid
    -    * @param {Number} rows Number of columns.
    -    * @param {Number} cols Number of rows.
    -    * @return {Object} Returns the instance of the Gridster class.
    -    */
    -    fn.generate_faux_grid = function(rows, cols) {
    -        this.faux_grid = [];
    -        this.gridmap = [];
    -        var col;
    -        var row;
    -        for (col = cols; col > 0; col--) {
    -            this.gridmap[col] = [];
    -            for (row = rows; row > 0; row--) {
    -                var coords = $({
    -                        left: this.baseX + ((col - 1) * this.min_widget_width),
    -                        top: this.baseY + (row -1) * this.min_widget_height,
    -                        width: this.min_widget_width,
    -                        height: this.min_widget_height,
    -                        col: col,
    -                        row: row,
    -                        original_col: col,
    -                        original_row: row
    -                    }).coords();
    -
    -                this.gridmap[col][row] = false;
    -                this.faux_grid.push(coords);
    -            }
    -        }
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Recalculates the offsets for the faux grid. You need to use it when
    -    * the browser is resized.
    -    *
    -    * @method recalculate_faux_grid
    -    * @return {Object} Returns the instance of the Gridster class.
    -    */
    -    fn.recalculate_faux_grid = function() {
    -        var aw = this.$wrapper.width();
    -        this.baseX = ($(window).width() - aw) / 2;
    -        this.baseY = this.$wrapper.offset().top;
    -
    -        $.each(this.faux_grid, $.proxy(function(i, coords) {
    -            this.faux_grid[i] = coords.update({
    -                left: this.baseX + (coords.data.col -1) * this.min_widget_width,
    -                top: this.baseY + (coords.data.row -1) * this.min_widget_height
    -            });
    -
    -        }, this));
    -
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Get all widgets in the DOM and register them.
    -    *
    -    * @method get_widgets_from_DOM
    -    * @return {Object} Returns the instance of the Gridster class.
    -    */
    -    fn.get_widgets_from_DOM = function() {
    -        this.$widgets.each($.proxy(function(i, widget) {
    -            this.register_widget($(widget));
    -        }, this));
    -        return this;
    -    };
    -
    -
    -    /**
    -    * Calculate columns and rows to be set based on the configuration
    -    *  parameters, grid dimensions, etc ...
    -    *
    -    * @method generate_grid_and_stylesheet
    -    * @return {Object} Returns the instance of the Gridster class.
    -    */
    -    fn.generate_grid_and_stylesheet = function() {
    -        var aw = this.$wrapper.width();
    -        var ah = this.$wrapper.height();
    -
    -        var cols = Math.floor(aw / this.min_widget_width) +
    -                   this.options.extra_cols;
    -        var rows = Math.floor(ah / this.min_widget_height) +
    -                   this.options.extra_rows;
    -
    -        var actual_cols = this.$widgets.map(function() {
    -            return $(this).attr('data-col');
    -        });
    -        //needed to pass tests with phantomjs
    -        actual_cols.length || (actual_cols = [0]);
    -
    -        var actual_rows = this.$widgets.map(function() {
    -            return $(this).attr('data-row');
    -        });
    -        //needed to pass tests with phantomjs
    -        actual_rows.length || (actual_rows = [0]);
    -
    -        var min_cols = Math.max.apply(Math, actual_cols);
    -        var min_rows = Math.max.apply(Math, actual_rows);
    -
    -        this.cols = Math.max(min_cols, cols, this.options.min_cols);
    -        this.rows = Math.max(min_rows, rows, this.options.min_rows);
    -
    -        this.baseX = ($(window).width() - aw) / 2;
    -        this.baseY = this.$wrapper.offset().top;
    -
    -        if (this.options.autogenerate_stylesheet) {
    -            this.generate_stylesheet();
    -        }
    -
    -        /* more faux rows that needed are created so that there are cells
    -         * where drag beyond the limits */
    -        return this.generate_faux_grid(this.rows, this.cols);
    -    };
    -
    -
    -    //jQuery adapter
    -    $.fn.gridster = function(options) {
    -     return this.each(function() {
    -       if (!$(this).data('gridster')) {
    -         $(this).data('gridster', new Gridster( this, options ));
    -       }
    -     });
    -    };
    -
    -
    -}(jQuery, window, document));
    -
    -    
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index b51bc488f..000000000 --- a/docs/index.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - -
    -
    -
    - - -

    - -
    -
    - API Docs for: -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -
    -
    -

    - Browse to a module or class using the sidebar to view its API documentation. -

    - -

    Keyboard Shortcuts

    - -
      -
    • Press s to focus the API search box.

    • - -
    • Use Up and Down to select classes, modules, and search results.

    • - -
    • With the API search box or sidebar focused, use -Left or -Right to switch sidebar tabs.

    • - -
    • With the API search box or sidebar focused, use Ctrl+Left and Ctrl+Right to switch sidebar tabs.

    • -
    -
    -
    - - - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/docs/modules/index.html b/docs/modules/index.html deleted file mode 100644 index 487fe15b2..000000000 --- a/docs/modules/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Redirector - - - - Click here to redirect - -