dattn / dnd-grid

A vuejs grid with draggable and resizable boxes
307 stars 48 forks source link

Add component setup and dimension hints #12

Closed ndabAP closed 6 years ago

ndabAP commented 6 years ago

Just some small additions which I missed at first.

dattn commented 6 years ago

I think you should specify that the actual pixel size depends on the grid size, as seen here https://github.com/dattn/dnd-grid/blob/master/src/demo.vue#L81

ndabAP commented 6 years ago

So,

gridSize: {
  w: 101
}

and

position: {
  w: 2
}

results in 202 pixels?

dattn commented 6 years ago

Yes.

The position property, represents the position in the virtual grid. And the size of one cell in this grid is defined with the gridSize property.

ndabAP commented 6 years ago

Please see my latest commit.

dattn commented 6 years ago

Looks good to me

dattn commented 6 years ago

Thank you for the pull request. All Pull request should go to the develop branch, because my master branch represents the latest released version :)