gridster

Gridster with Highcharts, make specific Chart smaller and recalculate

こ雲淡風輕ζ 提交于 2020-01-14 06:07:48
问题 i am building a dashboard with gridster and highcharts. If i resize the window and a widget with a highchart is bigger than the window, i want to resize it to make it smaller and gridster should recalculate the positions of the others. I tried this code to make a widget and its highchart smaller if its bigger than the windows width: $( ".dashboard > li" ).each(function() { var chart = $(this).children('div'); // console.log(' Window: ' + width); console.log(chart); if(chart.width() > width) {

Gridster with Highcharts, make specific Chart smaller and recalculate

北战南征 提交于 2020-01-14 06:05:08
问题 i am building a dashboard with gridster and highcharts. If i resize the window and a widget with a highchart is bigger than the window, i want to resize it to make it smaller and gridster should recalculate the positions of the others. I tried this code to make a widget and its highchart smaller if its bigger than the windows width: $( ".dashboard > li" ).each(function() { var chart = $(this).children('div'); // console.log(' Window: ' + width); console.log(chart); if(chart.width() > width) {

Align gridster items using row and col values angularjs

六月ゝ 毕业季﹏ 提交于 2019-12-25 02:44:20
问题 I have created a dashboard using angularjs, kendoui charts and angular gridster (https://github.com/ManifestWebDesign/angular-gridster). So I have a function to add a gridster with chart like below :- // add widget to a dashboard $scope.addWidget = function () { // new widget configuration var newWidget = { id: $scope.allWidgetData.selectedOption.id, data_source: {}, config: { name: $scope.allWidgetData.selectedOption.name, sizeX: 3, sizeY: 2, row: $scope.row, col: $scope.col } }; } // make

Gridster not dynamically moving widgets

安稳与你 提交于 2019-12-23 05:28:01
问题 I am trying to use Gridster.js to do some drag and drop functionality in my project. I am using a bunch of divs for my widgets, with forms and buttons inside of these, instead of using an unordered list. My issue is that my first column is not being able to drag, and i can not drop my widgets anywhere. They just drop to back to their original spot Here is my layout: <div class="gridster"> <div class="dragMe" data-row="1" data-col="1" data-sizex="1" data-sizey="1"> <form> <button>//button

How do I drag a grid from one gridster to another gridster?

假如想象 提交于 2019-12-22 04:06:27
问题 How can I drag a grid from one gridster to another gridster? $(function () { //DOM Ready $(".gridster ul").gridster({ widget_margins: [5, 5], widget_base_dimensions: [160, 160] }); var gridster = $(".gridster ul").gridster().data('gridster'); $( ".draggable" ).draggable(); $( ".gridster " ).droppable({ drop: function( event, ui ) { $( ".draggable" ).removeAttr("style"); gridster.add_widget('<li class="new"></li>', 1, 1); } }); }); 回答1: You can use the remove_widget and add_widget functions of

Widget binding with Gridster and Knockout

房东的猫 提交于 2019-12-22 00:19:24
问题 I am new to Javascript and trying to use Gridster with Knockout. I have a database with items, and I use knockout foreach to bind them to a UL. The UL is styled with the Gridster library. Everything works great unless I try to add additional elements to the UL via the ObservableArray in the viewmodel. Can anyone help me understand the scope and order of operations here? It feels like the Gridster library isn't doing its styling to the new widgets. This jsfiddle shows a working demo of the

Make gridster.js tiles stick in specific grid positions (snap to grid)

时光毁灭记忆、已成空白 提交于 2019-12-21 07:12:15
问题 is there any way to make Gridster.js tile(s) stick, that is not move up vertically to fill empty space. Kind of like the way a layout program with snap-to-grid turned on works... 回答1: Use this fork https://github.com/dsmorse/gridster.js with shift_widgets_up: false option. See demo : http://dsmorse.github.io/gridster.js/demos/sticky-postion.html 回答2: Have you tried packery? http://packery.metafizzy.co/ This library has many drag and drop features. 回答3: You may also be interested in the

How do I avoid a click event firing after dragging a gridster.js widget with clickable content?

自古美人都是妖i 提交于 2019-12-20 03:49:43
问题 I'm using Gridster (http://gridster.net/) which able to drag the content inside the li . In my li there is a clickable div. <li data-row="1" data-col="1" data-sizex="2" data-sizey="1"> <a href=' '> <div> content </div> </a> </li> so here is the problem I'm facing, when I stop and release the dragging, it will invoke the click in the div, how can I just dragging the div, but not invoking the click after drag stop&release. I do not want it to redirect to another page after dragging( user drag

Resize issue while gridster.js with highcharts

泄露秘密 提交于 2019-12-19 04:46:07
问题 Highcharts inside the gridster widgets not resize automatically when I resize the gridster widgets. When I resize the window, highchart are resized based on the grid sizes. But it should happen automatically when I resize the grid. Code I tried is below : <html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>GridSter With HighChart</title> <link rel="stylesheet" type="text/css" href="http://gridster.net/dist/jquery.gridster.css"> <link rel="stylesheet" type=

How to position the jquery gridster after remove a widget?

我与影子孤独终老i 提交于 2019-12-12 05:39:33
问题 I can remove widget but I am facing problem with positioning the remain widgets. When I remove a widget from top the bottom widget will automatically get moved to top its looks good. But when I remove a widget from left the right widget not gets moved to left? 回答1: Finally i solved this problem <div class="gridster"> <ul> <li data-row="1" data-col="1" data-sizex="2" data-sizey="2">0<span class="removeWidget">X</span></li> <li data-row="1" data-col="3" data-sizex="1" data-sizey="2">1<span