hootsuite / grid

Drag and drop library for two-dimensional, resizable and responsive lists
http://hootsuite.github.io/grid/
Apache License 2.0
3.57k stars 279 forks source link

Why the id attribute in the grid item is required to be a Number? #86

Open rafaelmaiolla opened 8 years ago

rafaelmaiolla commented 8 years ago

The following line: https://github.com/hootsuite/grid/blob/master/src/jquery.gridList.js#L201 transform the id to a number. Is there a reason for the id to be a number?

ovidiu-chereches-hs commented 8 years ago

Is there a reason for the id to be a number?

Can't think of one, probably just a legacy decision. If I'm not mistaken, id is just a generic assumption the lib has about your items, but it doesn't actually use it anywhere. @NiGhTTraX correct me if I'm wrong.

andrei-picus-hs commented 8 years ago

@ovidiu-chereches-hs seems that way. At first I thought it was used inside the jQuery plugin to get the list of changed items, but it's using $element for that. Someone should remove it and see if anything breaks.