Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
deepbit committed Oct 14, 2015
1 parent 26290bb commit 50e30b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions pynteractive/phylotree.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def _refresh(self):

for tipname,color in self.cladeMarks.items():
self._update("markClade",tipname,color)
print "ALLA"

for tipname,color in self.cladeColors.items():
self._update("setCladeColor",tipname,color)
Expand Down
20 changes: 14 additions & 6 deletions webfiles/js/phyloElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ phyloElement.prototype.loadHtml = function () {

tag = {tag:'label', to:'#optionsNetwork', id: 'labelLabel', text: 'Hide Labels'};
this.loadHtmlTag(tag);
tag = {tag:'input', to:'#optionsNetwork', id: 'disableTipLabels', type: 'checkbox', checked: this.disableTipLabels, onclick: 'element.toogleTipLabels();'};
tag = {tag:'input', to:'#optionsNetwork', id: 'disableTipLabels', type: 'checkbox', checked: this.disableTipLabels, onclick: 'element.toggleTipLabels();'};
this.loadHtmlTag(tag);
tag = {tag:'br', to:'#optionsNetwork'};
this.loadHtmlTag(tag);

tag = {tag:'label', to:'#optionsNetwork', id: 'disableNodeCirclesLabel', text: 'Hide Node Circles'};
this.loadHtmlTag(tag);
tag = {tag:'input', to:'#optionsNetwork', id: 'disableNodeCirclesLabel', type: 'checkbox', checked: this.disableNodeCirclesLabel, onclick: 'element.toogleNodeCircles();'};
tag = {tag:'input', to:'#optionsNetwork', id: 'disableNodeCirclesLabel', type: 'checkbox', checked: this.disableNodeCirclesLabel, onclick: 'element.toggleNodeCircles();'};
this.loadHtmlTag(tag);

tag = {tag:'br', to:'#optionsNetwork'};
Expand Down Expand Up @@ -416,11 +416,19 @@ phyloElement.prototype.drawData = function () {
element.maxR=maxR.y;


element.drawNodeCircles()
if (!element.disableNodeCircles){
element.drawNodeCircles()
}
element.drawTipLabels()

this.ntracks=0;
element.trackRadius=maxR.y+25+maxR.label.getBBox().width*1.2;
if (this.disableTipLabels){
element.trackRadius=maxR.y+25;
}
else
{
element.trackRadius=maxR.y+25+maxR.label.getBBox().width*1.2;
}
element.paintAllFeatures()
}

Expand Down Expand Up @@ -858,13 +866,13 @@ phyloElement.prototype.changeCircularLabel = function () {
element.reLayoutTips();
}

phyloElement.prototype.toogleTipLabels = function () {
phyloElement.prototype.toggleTipLabels = function () {
element.disableTipLabels = !element.disableTipLabels;
element.drawTipLabels()

}

phyloElement.prototype.toogleNodeCircles = function () {
phyloElement.prototype.toggleNodeCircles = function () {
element.disableNodeCircles = !element.disableNodeCircles;

if (element.disableNodeCircles){
Expand Down

0 comments on commit 50e30b8

Please sign in to comment.