X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-core-debug.js;fp=roojs-core-debug.js;h=9c5085a0a6353a9d4218e30ea1a90a51f101f245;hp=54ce8c6b7ccff17237e40afdac945446e5444c5b;hb=d81ddeecb21edfe27401017eb4d0cc01dfae425b;hpb=5a09638750d76b5c2f42753ab924401909761f61 diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 54ce8c6b7c..9c5085a0a6 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -668,7 +668,30 @@ Roo.factory(conf, Roo.data); { var node = Roo.DomQuery.selectNode(selector,root); return node ? Roo.get(node) : new Roo.Element(false); - } + }, + /** + * Find the current bootstrap width Grid size + * Note xs is the default for smaller.. - this is currently used by grids to render correct columns + * @returns {String} (xs|sm|md|lg|xl) + */ + + getGridSize : function() + { + var w = Roo.lib.Dom.getViewWidth(); + switch(true) { + case w > 1200: + return 'xl'; + case w > 992: + return 'lg'; + case w > 768: + return 'md'; + case w > 576: + return 'sm'; + default: + return 'xs' + } + + } });