gridster

Save gridster layout using angularjs

亡梦爱人 提交于 2019-12-11 08:43:15
问题 I am creating dashboard application with Gridster: https://github.com/ManifestWebDesign/angular-gridster I would like to save my layout to database using JSON. What I do know, is that I store charts array to database and fetch it. Is it possible to store widget col,row and size to specific widget so I could then give the size-x and size-y with angular style {{chart.xsize}}. When creating widget I could then assign default size values and save only after user has resized or dragged widget. Or

HighStocks draggable element interfering with gridster dragging

最后都变了- 提交于 2019-12-11 02:12:06
问题 I am using a stocks chart from HighStocks together with gridster. Each individual block in gridster is freely draggable. However, the stocks time slider gadget is also draggable and resizable. Since it sits on top of a gridster widget, whenever I drag the slider around, the entire widget also moves. I included a JSFiddle to demonstrate my point. http://jsfiddle.net/faPrd/ It's not as pronounced in this Fiddle because there are not that many elements, but you can already see that when you drag

How to remove a single widget from gridster.js by his dynamically created id

守給你的承諾、 提交于 2019-12-10 15:47:52
问题 I need to know how can I remove a single gridster.js widget by his dynamically created id with gridster.add_widget. Every new widget created has an own button to remove that single widget, but I can't make it work. Here is my Code $(document).ready(function(){ var count = 0; var newid = count + 1; $(document).on("click", "#newGrid", function() { var gridster = $(".gridster ul").gridster().data('gridster'); gridster.add_widget('<li id="block"'+newid'>Hello, now delete me <span id="remove"'

Gridster add_widget is slow

跟風遠走 提交于 2019-12-07 17:26:39
问题 I want use Gridster for my web site, but i need to add lot of widgets with "add_widget" command. I do a test and i think there is a problem with "add_widget" function : grid is more and more slow and there are memory leak. You can see that in this video : grister problem video However, as you can see on the video, if i add widget at beginning (not with add_widget function) there is no problem. Can you help me ? Something wrong with my code ? Thanks in advance ! 回答1: In my own experience, the

Not getting gridster serialize data after resizing the boxes

耗尽温柔 提交于 2019-12-07 12:21:01
问题 I am trying to get serialized data after changing the size and position of boxes. But I get the on load details only. How to get serialize data after resize the boxes. And I also want to get the text(value in the box) of the box. This is my code: $(function() { var gridster = $(".gridster > ul").gridster({ widget_margins: [10, 10], widget_base_dimensions: [230, 160], helper: 'clone', resize: { enabled: true, }, serialize_params: function($w, wgd) { return { id: $($w).attr('.drop'), col: wgd

Move Gridster Widgets programmatically

纵然是瞬间 提交于 2019-12-07 11:25:55
问题 I am trying to move Gridster widget programmatically , I want to achieve the effect like dragging the gridster widget . Currently i am assigning data-col and data-row attribute using Jquery but the gridster widget simply just overlapped with other gridster widgets and other widgets are not repositioning like they do while dragging the gridster widget .What should i do ? TIA. 回答1: I didn't find a corresponding API method, but you can check a mutate_widget_in_gridmap function: http://gridster

Make only one gridster widget resizable

孤街醉人 提交于 2019-12-06 12:33:14
问题 Is it possible to make only one gridster widget resizable? I've made it so the user can click on a widget heading so that it expands & contracts. I'd like to make it so that when a widget is expanded, it is resizable. Can this be done? If so, how? 回答1: When resize is enable each widget get the gs-resize-handle class in a span element with the setup_resize() function. so you can play with css to hide the resize handle with css by adding a custom class like : .no-resize .gs-resize-handle-both{

Not getting gridster serialize data after resizing the boxes

邮差的信 提交于 2019-12-05 22:45:29
I am trying to get serialized data after changing the size and position of boxes. But I get the on load details only. How to get serialize data after resize the boxes. And I also want to get the text(value in the box) of the box. This is my code: $(function() { var gridster = $(".gridster > ul").gridster({ widget_margins: [10, 10], widget_base_dimensions: [230, 160], helper: 'clone', resize: { enabled: true, }, serialize_params: function($w, wgd) { return { id: $($w).attr('.drop'), col: wgd.col, row: wgd.row, size_x: wgd.size_x, size_y: wgd.size_y }; } }).data('gridster'); //serialization//

Widgets with different dynamic content (angular-gridster)

爱⌒轻易说出口 提交于 2019-12-05 02:07:52
问题 I am trying to create a web dashboard based on angularjs with angular-gridster module. The gridster works fine and I don't have any problems binding content to it (like text or images with ng-bind-html). But in fact I don't want to add only text or images to these "widgets", I'm trying to create a dashboard with dynamic content in it. So, as a user I want to add a new widget to the dashboard and choose a type (for example a clock-widget or something else) and maybe configure the widget. The

Make only one gridster widget resizable

核能气质少年 提交于 2019-12-04 20:24:05
Is it possible to make only one gridster widget resizable? I've made it so the user can click on a widget heading so that it expands & contracts. I'd like to make it so that when a widget is expanded, it is resizable. Can this be done? If so, how? When resize is enable each widget get the gs-resize-handle class in a span element with the setup_resize() function. so you can play with css to hide the resize handle with css by adding a custom class like : .no-resize .gs-resize-handle-both{ display:none; } and when you expand your widget your remove your custom class. EDIT : An another way to do