summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph/graph_renderer.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-01-04 16:17:14 +0100
committerAaron Bohy <aab@odoo.com>2018-01-26 19:26:03 +0100
commitcf178a2f068acd4b4c4fc2cda00b6ef8f6dc79c0 (patch)
tree8cc09ab6d4d81619654c008058f5b28874eae150 /addons/web/static/src/js/views/graph/graph_renderer.js
parentcb339842d4d8b19f3870127c00a6868af2e95004 (diff)
[IMP] web,*: config: add XXS size to config.device
In Less, the size_class XXS is defined and used in media queries. This rev. adds it in JS for sake of consistency. Code in addons comparing the size_class needed to be adapted due to the new XXS size_class. Moreover, we now use the helper 'config.device.isMobile' everywhere we should, instead of manually comparing the size_class. Finally, we changed the way the config.device has to be specified in the test environment. From now on, only the size_class should be set, and the isMobile flag is computed automatically.
Diffstat (limited to 'addons/web/static/src/js/views/graph/graph_renderer.js')
-rw-r--r--addons/web/static/src/js/views/graph/graph_renderer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_renderer.js b/addons/web/static/src/js/views/graph/graph_renderer.js
index 4d51f8786d0..07155e327e3 100644
--- a/addons/web/static/src/js/views/graph/graph_renderer.js
+++ b/addons/web/static/src/js/views/graph/graph_renderer.js
@@ -20,7 +20,7 @@ var qweb = core.qweb;
var CHART_TYPES = ['pie', 'bar', 'line'];
// hide top legend when too many items for device size
-var MAX_LEGEND_LENGTH = 25 * (1 + config.device.size_class);
+var MAX_LEGEND_LENGTH = 25 * (Math.max(1, config.device.size_class));
return AbstractRenderer.extend({
className: "o_graph_svg_container",