Gridstack.js wrong position when change height

329
November 26, 2016, at 11:15 AM

I'm using gridstack.js 0.2.5. Grid initialized from this and layout is true, item4 at top (first)

[
    {"id":"item1","x":0,"y":3,"width":2,"height":1},
    {"id":"item2","x":0,"y":2,"width":1,"height":1},
    {"id":"item3","x":0,"y":4,"width":1,"height":1},
    {"id":"item4","x":0,"y":0,"width":2,"height":1},
    {"id":"item5","x":0,"y":1,"width":2,"height":1}
]

But when change height of item4, this item placed last position.

[
    {"id":"item1","x":0,"y":3,"width":2,"height":1},
    {"id":"item2","x":0,"y":2,"width":1,"height":1},
    {"id":"item3","x":0,"y":4,"width":1,"height":1},
    {"id":"item4","x":0,"y":0,"width":2,"height":2},
    {"id":"item5","x":0,"y":1,"width":2,"height":1}
]

And this is code to build layout through looping items

//grid.addWidget(element, x, y, width, height, autoposition);
grid.addWidget(el, node.x, node.y, node.width, node.height, false);

Please help me. Thanks

Answer 1

I will try to find out whats wrong with my Yii2 app. Because when I tried at jsfiddle the layout seem ok

Thanks Stackoverflow

READ ALSO
jquery text slider next/looping issue

jquery text slider next/looping issue

I'm having some glitch with the content of the text slider I foundWhen your on the last slide of the slider (or maybe it always trigger when you clicked on the next arrow) then click on next you should see the first slide but what happens is you see blank slide then it will appear...

215
Pre-roll for youtube in multiple posts

Pre-roll for youtube in multiple posts

I need to insert pre-roll video to multiply id's elements which contain youtube videosHow can I realize it? And how to initialise any players in only one function onYouTubePlayerAPIReady for attaching itself individual pre-roll

333
Obfuscated URLs and Regexp

Obfuscated URLs and Regexp

I came across a problem while acquiring video link from an embedded video from thevideome website

339