cms/app-client/app/components/discourses-component.js
author ymh <ymh.work@gmail.com>
Wed, 08 Feb 2017 15:25:24 +0100
changeset 502 74fba571487e
parent 467 762fc0eb4946
child 511 fbf4e1afab01
permissions -rw-r--r--
Complete the notice display. add various fields to document to correctly display the notice. Correct bug #0025746
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     1
import Ember from 'ember';
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
     2
import * as d3 from 'd3-selection';
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
     3
import * as d3h from 'd3-hierarchy';
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
     4
import * as d3s from 'd3-scale';
392
4fbe94af93e8 Improve filter service. Centralize filter management in a single point
ymh <ymh.work@gmail.com>
parents: 362
diff changeset
     5
import _ from 'lodash/lodash';
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     6
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
     7
const MINIMUM_CIRCLE_WIDTH = 60.0;
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
     8
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     9
export default Ember.Component.extend({
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    10
206
e038d5782d06 Discourses component: Modify label styles / Styling to SCSS / Cursor pointer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 198
diff changeset
    11
    classNames: ['discourses-component'],
e038d5782d06 Discourses component: Modify label styles / Styling to SCSS / Cursor pointer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 198
diff changeset
    12
176
d1baf7ccecc8 Add `thematiques` components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 175
diff changeset
    13
    constants: Ember.inject.service(),
197
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 194
diff changeset
    14
    filter: Ember.inject.service(),
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    15
    utils: Ember.inject.service(),
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    16
292
df030ddd4eca Convert discourses pack circles to div + Highlight select filter
Chloe Laisne <chloe.laisne@gmail.com>
parents: 286
diff changeset
    17
    discourseObserver: Ember.observer('filter.discourse', function() {
df030ddd4eca Convert discourses pack circles to div + Highlight select filter
Chloe Laisne <chloe.laisne@gmail.com>
parents: 286
diff changeset
    18
        Ember.$('.item').removeClass("selected");
392
4fbe94af93e8 Improve filter service. Centralize filter management in a single point
ymh <ymh.work@gmail.com>
parents: 362
diff changeset
    19
        if(this.get('filter').get('discourse') !== null) {
4fbe94af93e8 Improve filter service. Centralize filter management in a single point
ymh <ymh.work@gmail.com>
parents: 362
diff changeset
    20
            this.get('filter').get('discourse').forEach(function(e) {
4fbe94af93e8 Improve filter service. Centralize filter management in a single point
ymh <ymh.work@gmail.com>
parents: 362
diff changeset
    21
                Ember.$('.item[data-id="' + e + '"]').addClass("selected");
4fbe94af93e8 Improve filter service. Centralize filter management in a single point
ymh <ymh.work@gmail.com>
parents: 362
diff changeset
    22
            });
4fbe94af93e8 Improve filter service. Centralize filter management in a single point
ymh <ymh.work@gmail.com>
parents: 362
diff changeset
    23
        }
4fbe94af93e8 Improve filter service. Centralize filter management in a single point
ymh <ymh.work@gmail.com>
parents: 362
diff changeset
    24
292
df030ddd4eca Convert discourses pack circles to div + Highlight select filter
Chloe Laisne <chloe.laisne@gmail.com>
parents: 286
diff changeset
    25
    }).on('init'),
df030ddd4eca Convert discourses pack circles to div + Highlight select filter
Chloe Laisne <chloe.laisne@gmail.com>
parents: 286
diff changeset
    26
176
d1baf7ccecc8 Add `thematiques` components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 175
diff changeset
    27
    didRender: function() {
466
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
    28
        var previousDiv = d3.selectAll(".discourses");
176
d1baf7ccecc8 Add `thematiques` components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 175
diff changeset
    29
        var self = this;
261
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 216
diff changeset
    30
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    31
        var discourses = this.get('discourses');
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    32
        var array = discourses.map(function (d) { return d.get('count'); });
265
5995d360e6ac Discourse bubbles radius range + font size
Chloe Laisne <chloe.laisne@gmail.com>
parents: 261
diff changeset
    33
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    34
        var width = self.$().parent().width();
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    35
        var height = self.$().parent().height() - self.$().siblings().outerHeight(true);
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    36
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    37
        //Determine the minimum circle width
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    38
        var longerStr = _.max(
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    39
          [].concat(...(discourses.map(function(d) { return d.get('label').split(' ');}))),
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    40
          function(s) { return s.length; }
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    41
        );
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    42
        var w = this.get('utils').getWidthOfText(longerStr, '11px');
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    43
        // we try to take into account the fact that there is at least 2 lines
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    44
        var minimum_circle_width = Math.max( Math.sqrt((w*w)+Math.pow(11+11/2, 2)) + 10, MINIMUM_CIRCLE_WIDTH);
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    45
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    46
        // to avoid division by zero. In any case it makes no sense to consider dimensions
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    47
        // under MINIMUM_CIRCLE_WIDTH
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    48
        var scaleFactor = minimum_circle_width/Math.max(minimum_circle_width, Math.min(width, height));
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    49
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    50
        var min = Math.min(...array),
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    51
            max = Math.max(...array);
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    52
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    53
        var scale = d3s.scaleLinear();
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    54
        // The range is the range for font sizes
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    55
        var fontScale = d3s.scaleQuantize().domain([min, max]).range(_.range(10, 14));
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    56
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    57
        if((min/max) < scaleFactor) {
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    58
          scale = scale.domain([min, max]).range([scaleFactor, 1]);
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    59
        }
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    60
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    61
        var bubble = d3h.pack()
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    62
            .size([width, height])
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    63
            .padding(10);
181
b8a783ca6c4a Bubble paddings, sizes, and captions
Chloe Laisne <chloe.laisne@gmail.com>
parents: 178
diff changeset
    64
466
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
    65
        var element = d3.select('#' + self.get('elementId'))
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
    66
          .append('div')
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
    67
          .attr('class','discourses')
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
    68
          .style('position','absolute')
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
    69
          .style('left', -100000);
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    70
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    71
        var root = d3h.hierarchy(self.createNodes())
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    72
          .sum(function(d) {return scale(d.value);});
181
b8a783ca6c4a Bubble paddings, sizes, and captions
Chloe Laisne <chloe.laisne@gmail.com>
parents: 178
diff changeset
    73
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    74
        var bubbles = bubble(root).descendants();
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    75
        var nodes = element
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    76
            .selectAll()
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    77
            .data(bubbles);
181
b8a783ca6c4a Bubble paddings, sizes, and captions
Chloe Laisne <chloe.laisne@gmail.com>
parents: 178
diff changeset
    78
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    79
        nodes.enter().append("div")
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    80
            .attr("class", function(d) { return ( d.children ? "category": "item" ) + ( (self.get('filter').get('discourse') !== null && _.contains(self.get('filter').get('discourse'), d.id)) ? " selected" : "" ) ; });
183
cc8b022088c8 Bubble click area + Linting
Chloe Laisne <chloe.laisne@gmail.com>
parents: 181
diff changeset
    81
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    82
        var item = element.selectAll(".item")
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    83
            .attr("data-id", function(d) { return d.data.id; })
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    84
            .style("left", function(d) { return ( d.x - d.r)  + "px"; })
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    85
            .style("top", function(d) { return ( d.y - d.r)  + "px"; })
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    86
            .style("width", function(d) { return (d.r * 2) + "px"; })
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    87
            .style("height", function(d) { return (d.r * 2) + "px"; })
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    88
            .style("background-color", function(d) { return d.data.fill; })
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    89
            .style("border-color", function(d) { return d.data.stroke; })
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    90
            .style("font-size", function(d) { return fontScale(d.data.count) + 'px'; })
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    91
            .on('click', function(d) {
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    92
                self.get('filter').setFilter('discourse', d.data.id);
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    93
            });
261
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 216
diff changeset
    94
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    95
        item.append("span")
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 466
diff changeset
    96
            .html(function(d) { return d.data.name + ' <span class="count">(' + d.data.count + ')</span>'; })
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    97
            .style("margin-left", function() { return ( Ember.$(this).width() > Ember.$(this).parent().width() ? - ( Ember.$(this).width() / 2 ) + ( Ember.$(this).parent().width() / 2 ) : 0 ) + 'px'; })
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
    98
            .style("margin-top", function() { return Ember.$(this).parent().height() / 2 - Ember.$(this).height() / 2 + 'px'; });
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    99
466
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
   100
        previousDiv.remove();
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
   101
        element.style('position',null).style('left',null);
a8effb60ccb6 correct discourse display and update
ymh <ymh.work@gmail.com>
parents: 465
diff changeset
   102
176
d1baf7ccecc8 Add `thematiques` components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 175
diff changeset
   103
        this._super(...arguments);
d1baf7ccecc8 Add `thematiques` components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 175
diff changeset
   104
    },
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
   105
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   106
    createNodes: function() {
176
d1baf7ccecc8 Add `thematiques` components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 175
diff changeset
   107
        var self = this;
310
b1f9bcfda379 Change discourse layout to spread bubbles accross
Chloe Laisne <chloe.laisne@gmail.com>
parents: 292
diff changeset
   108
        var children = [];
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   109
        var discourses = this.get('discourses');
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
   110
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   111
        discourses.forEach(function(discourse) {
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   112
            var category_key = self.get('constants').DISCOURSE_CATEGORY_KEYS[discourse.get('id')];
185
191883bd16a6 Set ID as discourse querystring value
Chloe Laisne <chloe.laisne@gmail.com>
parents: 184
diff changeset
   113
            var category_value = self.get('constants').DISCOURSE_CATEGORY_VALUES[category_key];
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
   114
310
b1f9bcfda379 Change discourse layout to spread bubbles accross
Chloe Laisne <chloe.laisne@gmail.com>
parents: 292
diff changeset
   115
            children.push({
465
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   116
                id: discourse.get('id'),
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   117
                name: discourse.get('label'),
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   118
                value: discourse.get('count'),
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   119
                count: discourse.get('count'),
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   120
                fill: category_value.fill,
9df336529b2f make filter and theme visualisatiion change on filter modification
ymh <ymh.work@gmail.com>
parents: 404
diff changeset
   121
                stroke: category_value.stroke
265
5995d360e6ac Discourse bubbles radius range + font size
Chloe Laisne <chloe.laisne@gmail.com>
parents: 261
diff changeset
   122
            });
176
d1baf7ccecc8 Add `thematiques` components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 175
diff changeset
   123
        });
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
   124
310
b1f9bcfda379 Change discourse layout to spread bubbles accross
Chloe Laisne <chloe.laisne@gmail.com>
parents: 292
diff changeset
   125
        return { 'children': children };
176
d1baf7ccecc8 Add `thematiques` components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 175
diff changeset
   126
    }
261
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 216
diff changeset
   127
175
7a7cfcba5bfe Add Discourses Component files
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
   128
});