Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-06-20 18:21:14 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-06-20 18:21:14 +0300
commite50739f4c7bf823f2c1a4a65363ed987eff7d399 (patch)
tree868f25f1a8fae9a7a2f52ebd6a3510ee3baa0550 /app/assets/javascripts/graphs
parent699badabc9670e836eafaf1c66248f49ea41a098 (diff)
Apply responsive design for Contributors graphs.
Fixes #18845.
Diffstat (limited to 'app/assets/javascripts/graphs')
-rw-r--r--app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee
index 584d281a510..834a81af459 100644
--- a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee
+++ b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee
@@ -121,7 +121,11 @@ class @ContributorsMasterGraph extends ContributorsGraph
class @ContributorsAuthorGraph extends ContributorsGraph
constructor: (@data) ->
- @width = $('.content').width()/2 - 100
+ # Don't split graph size in half for mobile devices.
+ if $(window).width() < 768
+ @width = $('.content').width() - 80
+ else
+ @width = ($('.content').width() / 2) - 100
@height = 200
@x = null
@y = null