Releases: gridstack/gridstack.js
Releases · gridstack/gridstack.js
v3.3.0
- big re-write on how
cellHeight()
works. you can now call it at any time (not just grid init options) including switching to 'auto' or other modes on the fly. - fix
cellHeight:auto
now keeps cell square as window resizes (regressing from 2.x TS conversion).Utils.throttle()
works better too (guaranteed to be called last event) - new
cellHeight:initial
which makes the cell squares initially, but doesn't change as windows resizes (better performance) - new grid option
cellHeightThrottle
(100ms) to control throttle of auto sizing triggers - fix 1600 height too small with
cellHeight:auto
loading in 1 column. Now detect we load at 1 column and size accordingly (default 'auto' could make big 700x700 cells, so explicit px might still be wanted) - fix 1538 loading nested into small size and sizing back up
- fix 1604 nested grid resizing fix
- fix 1599 H5 resize from left side can move item right
v3.2.0
- fix 1413 website & lib works on mobile. We now compile the latest v1.0.8
jquery.ui.touch-punch
into the JQ version (only 2k) so mobile devices (android, iphone, ipad, ms surface, etc...) are supported out of the box.
HTML5 version will require re-write to plainmousemove
& mobiletouchmove
instead of drag events in a future release. - small optimizations (create placeholder content on the fly, moved more DD code into draggable class)
v3.1.5
- fix 1572
column: N
option now sets CSS class so you don't have to - fix 1571 don't allow drop-in when grid is full
- fix 1570 easier to drag out/in from below
- fix 1579
cellHeight()
was not updating CSS correctly - fix 1581 H5 draggable by actual div handle rather than entire item (let content respond to drag as well)
v3.1.4
v3.1.3
- fix #1540 Safari H5 drag&drop now works (some issue remain #1550 and #1541)
- fix #1535 use
batchUpdate()
around grid init to make sure gs-y attributes are respected. - fix #1545
disableMove()
correctly prevents drag later (remove events and draggable attribute) - fix #1546 resize no longer delayed, which caused race conditions errors
- fix #1001 resizing near bottom/top needs to auto-scroll. thanks @hbcarlos!
v3.1.2
(fixed bundle size in 3.1.1)
- fix #1419 dragging into a fixed row grid works better (check if it will fit, else try to append, else won't insert)
possible BREAK (unlikely you use engine directly)
engine constructor takes Options struct rather than spelling arguments (easier to extend/use)
canBePlacedWithRespectToHeight()
->willItFit()
like grid method - fix #1330
maxW
does not work as intended with resizable handle"w"
- fix #1472 support all options for new dragged in widgets (read all
gs-xyz
attributes) - fix #1511 dragging any grid item content works
- fix #1438 web-component fixes & grid with 0 size initially. (edited)
v3.1.0
- add new
addGrid(parent, opts)
to create a grid and load children instead ofinit() + load()
, which is used byload()
to supports nested grids creation.
see nested.html demo. save()
will now work on nested grids, recursively saving info. added flag to also allow saving the current grid options + children
(needed for nested grids) so you can now call newadddGrid()
to re-create everything from JSON.- fix 1505 don't call
movable()
/resizable()
on locked items error. thanks @infime - fix 1517 force typescript 3.6 as 3.7+ has breaking change forcing apps to be at least 3.7 (we only used one tiny feature in newest TS, not worth the incompatibility).
v3.0.0
- the big news is we finally have a native HTML5 drag&drop plugin (no jquery/query-ui, entire bundle now at 1/3 the size 64k), in addition to legacy jq one (186k), and new static grid bundle (34k). Huge thanks to @rhlin for creating this in stealth mode. Read all about it in main doc.
- we now have a React example, in addition to Vue - Angular is next!. thanks @eloparco
- fix placeholder not having custom
GridStackOptions.itemClass
. thanks @pablosichert - fix #1484 dragging between 2 grids and back (regression in 2.0.1)
- fix #1471
load()
into 1 column mode doesn't resize back to 12 correctly - fix #1235
update(el, opts)
re-write to take allGridStackWidget
options (not just x,y,width,height) and do everything efficiently.
Hidinglocked()
,move()
,resize()
,minWidth()
, etc... as they just simply call update() which does all the constrain now as well! - delete
ddPlugin
grid option as we only have one drag&drop plugin at runtime, which is defined by the include you use (HTML5 vs jquery vs none) - BREAK: change attribute
data-gs-min-width
is nowgs-min-w
. We removed 'data-' from all attributes, and shorten 'width|height' to just 'w|h' to require less typing and more efficient (2k saved in .js alone!) #1491 #1492 - BREAK: also
GridStackWidget
used in most APIwidth|height|minWidth|minHeight|maxWidth|maxHeight
are now shorterw|h|minW|minH|maxW|maxH
as well #1493 - **** see migrating to v3 ****
v2.2.0
- add
margin
option now support multi values CSS format'5px 10px 0 20px'
or'5em 10em'
- add
data-gs-static-grid
attribute - fix
class="ui-draggable-disabled ui-resizable-disabled"
have been added back to static grid items, so existing CSS rule to style continue working #1435 - fix getting DOM element by id with number works (api that uses
GridStackElement
handle more string formats) - fix setting
marginTop
(or any 4 sides) caused resize to break. Marking legacy as I recommend using new margin format. Thanks @deadivan for suggested fix.
v2.1.0
- fix grid
static: true
to no longer add any drag&drop (even disabled) which should speed things up, andsetStatic(T/F)
will now correctly add it back/delete for items that need it only.
Also fixed JQ draggable warning if not initialized first #858 - add
addWidget(opt)
now handles just passing aGridStackWidget
which creates the default divs, simplifying your code. Old API still supported. - add
save(saveContent = true)
now lets you optionally save the HTML content in the node property, with load() restoring it #1418 - add
GridStackWidget.content
now lets you add any HTML content when callingload()/save()
oraddWidget()
#1418 - add
ColumnOptions
tocolumn(n, options)
for multiple re-layout options, including 'none' that will preserve the x and width, until out of bound/overlap #1338
including a custom function for you to create the new layout #1332