closes #338 ugly text labels. fixes error when trying to load topic page with a metacode set selected
This commit is contained in:
parent
bfa25bc604
commit
c567f07a50
3 changed files with 11 additions and 4 deletions
|
@ -205,6 +205,8 @@ function selectNodeOnClickHandler(node, e) {
|
|||
return;
|
||||
}
|
||||
|
||||
console.log(e);
|
||||
|
||||
var check = nodeWasDoubleClicked();
|
||||
if (check) {
|
||||
nodeDoubleClickHandler(node, e);
|
||||
|
|
|
@ -7293,7 +7293,7 @@ Graph.Label.Native = new Class({
|
|||
// START METAMAPS CODE
|
||||
var index;
|
||||
for (index = 0; index < customLabel.length; ++index) {
|
||||
ctx.fillText(customLabel[index], pos.x, pos.y + node.getData("height") + 5 + (25*index));
|
||||
ctx.fillText(customLabel[index], pos.x, pos.y + node.getData("height") + 8 + (25*index));
|
||||
}
|
||||
// END METAMAPS CODE
|
||||
},
|
||||
|
|
|
@ -9,10 +9,15 @@
|
|||
<div class="openMetacodeSwitcher openLightbox" data-open="switchMetacodes"></div>
|
||||
<div id="metacodeImg">
|
||||
<% @m = user.settings.metacodes %>
|
||||
<% set = @m[0].include?("metacodeset") ? MetacodeSet.find(@m[0].sub("metacodeset-","").to_i) : false %>
|
||||
<% if set %>
|
||||
<% @metacodes = set.metacodes %>
|
||||
<% else %>
|
||||
<% @metacodes = [] %>
|
||||
<% @m.each do |m| %>
|
||||
<% @metacodes.push(Metacode.find(m.to_i)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% @metacodes.sort! {|m1,m2| m2.name.downcase <=> m1.name.downcase }.rotate!(-1) %>
|
||||
<% @metacodes.each do |metacode| %>
|
||||
<img class="cloudcarousel" width="40" height="40" src="<%= metacode.icon %>" alt="<%= metacode.name %>" title="<%= metacode.name %>"/>
|
||||
|
|
Loading…
Reference in a new issue