Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
deepbit committed Oct 16, 2015
1 parent 866f588 commit 2edb4a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions webfiles/js/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,11 @@ element.prototype.action = function (e){
* execute action
*/
element.prototype.addAction = function (id, name){
tag = {tag:'label', to:'#optionsNetwork', id: 'labelAction'+id, text: name};
tag = {tag:'br', to:'#optionsNetwork',class:"pyAction"};
this.loadHtmlTag(tag);
tag = {tag:'button', to:'#optionsNetwork', id: 'Action'+id, type: 'button', idAction: id, onclick: 'element.action(this);'};
tag = {tag:'label', to:'#optionsNetwork', id: 'labelAction'+id, text: name,class:"pyAction"};
this.loadHtmlTag(tag);
tag = {tag:'br', to:'#optionsNetwork'};
tag = {tag:'button', to:'#optionsNetwork', id: 'Action'+id, type: 'button', idAction: id, onclick: 'element.action(this);',class:"pyAction"};
this.loadHtmlTag(tag);
};

Expand Down
12 changes: 9 additions & 3 deletions webfiles/js/phyloElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,11 @@ phyloElement.prototype.changeResolution = function (value) {
element.maxrange = 2.7+((value-960)*0.0043);

element.initParams();
d3.selectAll('br.pyAction').remove();
d3.selectAll('label.pyAction').remove();
d3.selectAll('button.pyAction').remove();


PYCON.send("refresh",{"name": DATAID});
}

Expand Down Expand Up @@ -998,9 +1003,9 @@ phyloElement.prototype.addTrack=function ()
if (element.trackRadius==0){ setTimeout(function() { element.addTrack(); }, 500); return }
if (element.ntracks==0)
{
var nd=element.layout.selectAll().data([element.trackRadius]).enter().append("g").append("path").attr("d", trackCircleStep).attr("fill","none").attr("stroke","gray")
var nd=element.layout.selectAll().data([element.trackRadius]).enter().append("g").append("path").attr("d", trackCircleStep).attr("fill","none").attr("stroke","gray").attr("class","track")
}
var nd=element.layout.selectAll().data([element.trackRadius+(element.ntracks+1)*element.trackWidth]).enter().append("g").append("path").attr("d", trackCircleStep).attr("fill","none").attr("stroke","gray")
var nd=element.layout.selectAll().data([element.trackRadius+(element.ntracks+1)*element.trackWidth]).enter().append("g").append("path").attr("d", trackCircleStep).attr("fill","none").attr("stroke","gray").attr("class","track")
element.ntracks++;
}

Expand Down Expand Up @@ -1047,7 +1052,8 @@ phyloElement.prototype.clearTracks=function ()

phyloElement.prototype.deleteTracks=function ()
{
d3.selectAll('g.track').remove()
d3.selectAll('path.track').remove()
d3.selectAll('path.trackf').remove()
element.ntracks=0
}

Expand Down

0 comments on commit 2edb4a6

Please sign in to comment.