Skip to content

Conversation

@radiolips
Copy link
Member

Description

Piggyback on idea from #648 - when x and y coordinates for widgets are stored, run parseInt(num, 10) to ensure that they're treated as integers when sorting.

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (npm test)
  • Extended the README / documentation, if necessary

@radiolips radiolips merged commit 4b28629 into gridstack:develop Sep 17, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.399% when pulling 431cf67 on radiolips:bugfix/x-y-int into 58856cf on gridstack:develop.

y: el.attr('data-gs-y'),
x: parseInt(el.attr('data-gs-x'), 10),
y: parseInt(el.attr('data-gs-y'), 10),
width: el.attr('data-gs-width'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason you are not doing width/height/maxwidth/etc... as int as well ? el.attr() returning string should be checked throughout code IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants