Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gridion

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gridion

A small self-adjusting js grid.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Gridion v0.0.3

A small self-adjusting js grid.

Install via npm:

npm i gridion --save

js

import Gridion from 'gridion';
import 'gridion/dist/gridion.css';
let grid = new Gridion('.container',6);

Or use cdn:

<link rel="stylesheet" href="url">
<script src="url"></script>
let grid = new Gridion('.container',6);

Demo:

Simple demo url

Demo1 url

Demo2 (Infinity gallery) url

Usage:

let grid = new Gridion(parentSelector,cols);

parentSelector - tag selector that contains grid;

cols - columns amount;


let cellConfig = {
	size:{
		w:1,//width
		h:2//height
	},
	data:'content'//content,
    buildCallback:function(){
        //running callback when cell is added to model
    }
}

//just an array of cell configurations
let configList = [
    cellConfig1,
    cellConfig2,
];

grid.addItems(configList,index,cbk) - Adds cells to grid

grid.removeItem(id,cbk) - Remove cell from grid

grid.scaleItem(id,x,y,cbk) - Change cell size

grid.fastAddItem(config,index) - Adds cell to grid, without animation

grid.fastAddItems(configList,index) - Adds cells to grid, without animation

grid.fastRemoveItem(id) - Remove cell from grid, without animation

Keywords

FAQs

Package last updated on 24 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc