How to use gridstack - 5 common examples

To help you get started, we’ve selected a few gridstack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getredash / redash / client / app / components / dashboards / gridstack / gridstack.js View on Github external
for (let i = 0; i < fns.length; i += 1) {
        fns[i].apply(this, args);
      }
    };
  }
  return _.noop;
}

// eslint-disable-next-line import/prefer-default-export
function JQueryUIGridStackDragDropPlugin(grid) {
  gridstack.GridStackDragDropPlugin.call(this, grid);
}

gridstack.GridStackDragDropPlugin.registerPlugin(JQueryUIGridStackDragDropPlugin);

JQueryUIGridStackDragDropPlugin.prototype = Object.create(gridstack.GridStackDragDropPlugin.prototype);
JQueryUIGridStackDragDropPlugin.prototype.constructor = JQueryUIGridStackDragDropPlugin;

JQueryUIGridStackDragDropPlugin.prototype.resizable = function resizable(el, opts, key, value) {
  el = $(el);
  if (opts === 'disable' || opts === 'enable') {
    el.resizable(opts);
  } else if (opts === 'option') {
    el.resizable(opts, key, value);
  } else {
    el.resizable(_.extend({}, this.grid.opts.resizable, {
      // run user-defined callback before internal one
      start: sequence(this.grid.opts.resizable.start, opts.start),
      // this and next - run user-defined callback after internal one
      stop: sequence(opts.stop, this.grid.opts.resizable.stop),
      resize: sequence(opts.resize, this.grid.opts.resizable.resize),
    }));
github getredash / redash / client / app / components / dashboards / gridstack / gridstack.js View on Github external
if (fns.length > 0) {
    return function sequenceWrapper(...args) {
      for (let i = 0; i < fns.length; i += 1) {
        fns[i].apply(this, args);
      }
    };
  }
  return _.noop;
}

// eslint-disable-next-line import/prefer-default-export
function JQueryUIGridStackDragDropPlugin(grid) {
  gridstack.GridStackDragDropPlugin.call(this, grid);
}

gridstack.GridStackDragDropPlugin.registerPlugin(JQueryUIGridStackDragDropPlugin);

JQueryUIGridStackDragDropPlugin.prototype = Object.create(gridstack.GridStackDragDropPlugin.prototype);
JQueryUIGridStackDragDropPlugin.prototype.constructor = JQueryUIGridStackDragDropPlugin;

JQueryUIGridStackDragDropPlugin.prototype.resizable = function resizable(el, opts, key, value) {
  el = $(el);
  if (opts === 'disable' || opts === 'enable') {
    el.resizable(opts);
  } else if (opts === 'option') {
    el.resizable(opts, key, value);
  } else {
    el.resizable(_.extend({}, this.grid.opts.resizable, {
      // run user-defined callback before internal one
      start: sequence(this.grid.opts.resizable.start, opts.start),
      // this and next - run user-defined callback after internal one
      stop: sequence(opts.stop, this.grid.opts.resizable.stop),
github getredash / redash / client / app / components / dashboards / gridstack / gridstack.js View on Github external
function JQueryUIGridStackDragDropPlugin(grid) {
  gridstack.GridStackDragDropPlugin.call(this, grid);
}
github gridstack / gridstack.js / src / gridstack.jQueryUI.js View on Github external
(function(factory) {
  if (typeof define === 'function' && define.amd) {
    define(['jquery', 'gridstack', 'exports'], factory);
  } else if (typeof exports !== 'undefined') {
    try { jQuery = require('jquery'); } catch (e) {}
    try { gridstack = require('gridstack'); } catch (e) {}
    factory(jQuery, gridstack.GridStackUI, exports);
  } else {
    factory(jQuery, GridStackUI, window);
  }
})(function($, GridStackUI, scope) {
  /**
github zikula-modules / Content / src / modules / Zikula / ContentModule / Resources / public / js / vendor / gridstack.js / gridstack.jQueryUI.js View on Github external
(function(factory) {
    if (typeof define === 'function' && define.amd) {
        define(['jquery', 'gridstack', 'exports', 'jquery-ui/data', 'jquery-ui/disable-selection',
            'jquery-ui/focusable', 'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels',
            'jquery-ui/jquery-1-7', 'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur',
            'jquery-ui/scroll-parent', 'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version',
            'jquery-ui/widget', 'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable',
            'jquery-ui/widgets/droppable', 'jquery-ui/widgets/resizable'], factory);
    } else if (typeof exports !== 'undefined') {
        try { jQuery = require('jquery'); } catch (e) {}
        try { gridstack = require('gridstack'); } catch (e) {}
        factory(jQuery, gridstack.GridStackUI, exports);
    } else {
        factory(jQuery, GridStackUI, window);
    }
})(function($, GridStackUI, scope) {
    /**

gridstack

TypeScript/JS lib for dashboard layout and creation, responsive, mobile support, no external dependencies, with many wrappers (React, Angular, Vue, Ember, knockout...)

MIT
Latest version published 13 days ago

Package Health Score

92 / 100
Full package analysis