Change 'snap to' grid size - Extended Version

Anyone know how to change (or disable) the dashboard 'snap to' grid size?
Currently it's quite coarse, and trying the method described here made no difference.

I realize that I could edit the coordinates in the sql table to position items precisely, but it's not ideal....

Paul 

chaveiro's picture

Re: Change 'snap to' grid size - Extended Version

It's tied to grid size (the dots).

On Modules\dashboard\Views\js\designer.js

You can change the pixels size in line:

    'grid_size':20,

Or untied it by replacing:

    'snap': function(pos) {return Math.round(pos/designer.grid_size)*designer.grid_size;},

With:

    'snap': function(pos) {return Math.round(pos);},

 

Paul Reed's picture

Re: Change 'snap to' grid size - Extended Version

The first suggestion - changing the pixel size didn't work for me (or another member) but the second option of untying it completely did work OK.

- Just trying a different approach in laying out a mobile dashboard!

Thanks

Paul

dockarl's picture

Re: Change 'snap to' grid size - Extended Version

Thanks for the heads up on the solution Paul!, and thanks for the suggestion Chaveiro..

smitt1979's picture

Re: Change 'snap to' grid size - Extended Version

The first suggestion - changing the pixel size didn't work for me either but i did find a fix you can edit the line as below to change the pixel grid size

'snap': function(pos) {return Math.round(pos/5)*5;},

Steve

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.