Skip to content

Commit 4b28629

Browse files
authored
Merge pull request #784 from radiolips/bugfix/x-y-int
Update documentation and force x/y coords to be stores as ints.
2 parents 58856cf + 431cf67 commit 4b28629

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

doc/CHANGES.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ Change log
2323
- widgets can have their own resize handles. Use `data-gs-resize-handles` element attribute to use. For example, `data-gs-resize-handles="e,w"` will make the particular widget only resize west and east. ([#494](https://github.com/troolee/gridstack.js/issues/494)).
2424
- enable sidebar items to be duplicated properly. Pass `helper: 'clone'` in `draggable` options. ([#661](https://github.com/troolee/gridstack.js/issues/661), ([#396](https://github.com/troolee/gridstack.js/issues/396), ([#499](https://github.com/troolee/gridstack.js/issues/499)).
2525
- fix `staticGrid` grid option ([#743](https://github.com/troolee/gridstack.js/issues/743))
26-
- preserve inline styles when moving/cloning items (thanks silverwind)
26+
- preserve inline styles when moving/cloning items (thanks [@silverwind](https://github.com/silverwind))
2727
- fix bug causing heights not to get set ([#744](https://github.com/troolee/gridstack.js/issues/744))
28-
- allow grid to have min-height, fixes ([#628](https://github.com/troolee/gridstack.js/issues/628))
28+
- allow grid to have min-height, fixes ([#628](https://github.com/troolee/gridstack.js/issues/628)) (thanks [@adumesny](https://github.com/adumesny))
29+
- widget x and y are now ints (thanks [@DonnchaC](https://github.com/donnchac))
30+
- allow all droppable options (thanks [@vigor-vlad](https://github.com/vigor-vlad))
31+
- properly track mouse position in `getCellFromPixel` (thanks [@aletorrado](https://github.com/aletorrado))
2932

3033
## v0.3.0 (2017-04-21)
3134

src/gridstack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,8 +1272,8 @@
12721272

12731273
el.addClass(this.opts.itemClass);
12741274
var node = self.grid.addNode({
1275-
x: el.attr('data-gs-x'),
1276-
y: el.attr('data-gs-y'),
1275+
x: parseInt(el.attr('data-gs-x'), 10),
1276+
y: parseInt(el.attr('data-gs-y'), 10),
12771277
width: el.attr('data-gs-width'),
12781278
height: el.attr('data-gs-height'),
12791279
maxWidth: el.attr('data-gs-max-width'),

0 commit comments

Comments
 (0)