dattn / dnd-grid

A vuejs grid with draggable and resizable boxes
MIT License
308 stars 48 forks source link

Customizable grid and extra attributes #51

Open TheMaverickProgrammer opened 3 years ago

TheMaverickProgrammer commented 3 years ago

Features added:

Properties added:

gridStyle is a configuration to style the container as a grid and even include smaller, mini grids inside each cell/boxlayout:

innerGrid can be configured with the following properties:

The default object values for gridStyle object are as follows:

 {
    backgroundColor: "rgb(47, 122, 202)",
    color: "white",
    thickness: "2px",
    position: "-4px -4px, -4px -4px",
    innerGrid: {
        cols: 4,
        rows: 4,
        color: "#b0b0b0",
        position: "-2px -2px, -2px -2px",
        thickness: "1px"
    }
}

Image preview: Image Preview

* vue css object example

{
  border: '2px dashed gold',
  background: 'rgba(0,0,0,0.2)',
  zIndex: '0'
}