{"action":"created","issue":{"url":"https://api.github.com/repos/tdhock/animint/issues/116","labels_url":"https://api.github.com/repos/tdhock/animint/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/tdhock/animint/issues/116/comments","events_url":"https://api.github.com/repos/tdhock/animint/issues/116/events","html_url":"https://github.com/tdhock/animint/pull/116","id":113110793,"number":116,"title":"PredictedPeaks data and tests","user":{"login":"tdhock","id":932850,"avatar_url":"https://avatars.githubusercontent.com/u/932850?v=3","gravatar_id":"","url":"https://api.github.com/users/tdhock","html_url":"https://github.com/tdhock","followers_url":"https://api.github.com/users/tdhock/followers","following_url":"https://api.github.com/users/tdhock/following{/other_user}","gists_url":"https://api.github.com/users/tdhock/gists{/gist_id}","starred_url":"https://api.github.com/users/tdhock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdhock/subscriptions","organizations_url":"https://api.github.com/users/tdhock/orgs","repos_url":"https://api.github.com/users/tdhock/repos","events_url":"https://api.github.com/users/tdhock/events{/privacy}","received_events_url":"https://api.github.com/users/tdhock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-10-23T22:28:14Z","updated_at":"2015-10-28T22:09:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tdhock/animint/pulls/116","html_url":"https://github.com/tdhock/animint/pull/116","diff_url":"https://github.com/tdhock/animint/pull/116.diff","patch_url":"https://github.com/tdhock/animint/pull/116.patch"},"body":"I was designing the data viz below and I noticed that animint.js is sometimes rendering twice as many `<text>` elements as necessary in the first/top plot. In the screenshot below we see 3 text elements, and there are only 3 rows specified in the data:\r\n\r\n```r\r\n> subset(PredictedPeaks$chromCounts, chrom==\"chrM\" & dotID==\"38 neutro samples, 1 Input samples\")\r\n       nonInputType   type chrom chromStart chromEnd        peak.name\r\n259579       neutro  Input  chrM      16039    16155 chrM:16039-16155\r\n259580       neutro   mono  chrM      16039    16155 chrM:16039-16155\r\n259581       neutro neutro  chrM      16039    16155 chrM:16039-16155\r\n       samples.up type.fac up Input                              dotID bases\r\n259579          1    Input 38     1 38 neutro samples, 1 Input samples   116\r\n259580         14     mono 38     1 38 neutro samples, 1 Input samples   116\r\n259581         38   neutro 38     1 38 neutro samples, 1 Input samples   116\r\n       middle zoom.bases zoomStart zoomEnd relative.middle\r\n259579  16097       1160     14937   17257       0.9715131\r\n259580  16097       1160     14937   17257       0.9715131\r\n259581  16097       1160     14937   17257       0.9715131\r\n> \r\n```\r\n\r\n![screenshot-predictedpeaks](https://cloud.githubusercontent.com/assets/932850/10706189/b80a7faa-79b2-11e5-9faa-71f64c5603ab.png)\r\n\r\nbut in fact when I inspected the HTML in FireBug there are 6 elements!\r\n\r\nI managed to figure out that `update_selector` is being called twice after clicking a chromosome in the second plot, and the second call ends up creating twice as many elements. I commented out these lines of the JavaScript code, and the problem went away:\r\n\r\n```javascript\r\n      // update selected widgets, if necessary\r\n      if(s_info.type == \"multiple\" | \r\n\t selectized_array[v_name].getValue() != selected_ids) {\r\n\tselectized_array[v_name].setValue(selected_ids);\r\n      }\r\n```\r\n\r\nSo that tells me that `update_selector` is being called again inside of the selectize widget's `getValue` or `setValue`. @kferris10 do you have any ideas about how to fix this?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tdhock/animint/issues/comments/152013148","html_url":"https://github.com/tdhock/animint/pull/116#issuecomment-152013148","issue_url":"https://api.github.com/repos/tdhock/animint/issues/116","id":152013148,"user":{"login":"kferris10","id":6612411,"avatar_url":"https://avatars.githubusercontent.com/u/6612411?v=3","gravatar_id":"","url":"https://api.github.com/users/kferris10","html_url":"https://github.com/kferris10","followers_url":"https://api.github.com/users/kferris10/followers","following_url":"https://api.github.com/users/kferris10/following{/other_user}","gists_url":"https://api.github.com/users/kferris10/gists{/gist_id}","starred_url":"https://api.github.com/users/kferris10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kferris10/subscriptions","organizations_url":"https://api.github.com/users/kferris10/orgs","repos_url":"https://api.github.com/users/kferris10/repos","events_url":"https://api.github.com/users/kferris10/events{/privacy}","received_events_url":"https://api.github.com/users/kferris10/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T22:09:35Z","updated_at":"2015-10-28T22:09:35Z","body":"Why do you want to stop with an error?  If you don't like the `show_colour` name, we could just change it to `automatic_show_color`.  That might be a good idea anyway.  Or we could generate a warning message.  But I don't know if we need to error out."}}