Skip to content

Commit

Permalink
fix #125
Browse files Browse the repository at this point in the history
fix #125
  • Loading branch information
Bloodmallet committed Oct 14, 2018
1 parent 8982eeb commit 0f6035a
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions js/bloodmallet_standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1777,14 +1777,12 @@ function update_chart() {
}
}

let translated_name = get_translated_name(trait_name);

let translated_portions = translated_name.split("+");
let name_portions = trait_name.split("+");

let link = "";

for (let tmp_i in translated_portions) {
let translated_portion = translated_portions[tmp_i];
for (let tmp_i in name_portions) {
let name_portion = name_portions[tmp_i];
link += "<div style=\"display:inline-block; margin-bottom:-3px\">";

link += "<a href=\"https://";
Expand All @@ -1798,20 +1796,20 @@ function update_chart() {
link += ".wowhead.com/spell=";

try {
portion_spell_id = loaded_data[chosen_class][chosen_spec][data_name][fight_style]["spell_ids"][translated_portion.trim()];
portion_spell_id = loaded_data[chosen_class][chosen_spec][data_name][fight_style]["spell_ids"][name_portion.trim()];
} catch (error) {
portion_spell_id = spell_id;
}

link += portion_spell_id;

link += "\" target=\"blank\"";
if (whTooltips.iconizeLinks && !item_and_trait_equilizer[trait_name] && (translated_portions.length === 1 || translated_portions.length > 1 && translated_portions.length - 1 > tmp_i)) {
if (whTooltips.iconizeLinks && !item_and_trait_equilizer[trait_name] && (name_portions.length === 1 || name_portions.length > 1 && name_portions.length - 1 > tmp_i)) {
link += "class=\"chart_link\"";
}
link += ">" + translated_portion.trim() + "</a></div>";
link += ">" + get_translated_name(name_portion.trim()) + "</a></div>";

if (translated_portions.length > 1 && tmp_i < translated_portions.length - 1) {
if (name_portions.length > 1 && tmp_i < name_portions.length - 1) {
link += "<br/>+";
}
}
Expand Down Expand Up @@ -2306,13 +2304,12 @@ function update_trait_stacking_chart() {
}
}

let translated_name = get_translated_name(trait_name);
let translated_portions = translated_name.split("+");
let name_portions = trait_name.split("+");

let link = "";

for (let tmp_i in translated_portions) {
let translated_portion = translated_portions[tmp_i];
for (let tmp_i in name_portions) {
let name_portion = name_portions[tmp_i];

link += "<div style=\"display:inline-block; margin-bottom:-3px\"><a href=\"https://";

Expand All @@ -2327,20 +2324,20 @@ function update_trait_stacking_chart() {
let portion_spell_id = "";

try {
portion_spell_id = loaded_data[chosen_class][chosen_spec][data_view][fight_style]["spell_ids"][translated_portion.trim()];
portion_spell_id = loaded_data[chosen_class][chosen_spec][data_view][fight_style]["spell_ids"][name_portion.trim()];
} catch (error) {
portion_spell_id = spell_id;
}

link += portion_spell_id;

link += "\" target=\"blank\"";
if (whTooltips.iconizeLinks && !item_and_trait_equilizer[trait_name] && (translated_portions.length === 1 || translated_portions.length > 1 && translated_portions.length - 1 > tmp_i)) {
if (whTooltips.iconizeLinks && !item_and_trait_equilizer[trait_name] && (name_portions.length === 1 || name_portions.length > 1 && name_portions.length - 1 > tmp_i)) {
link += "class=\"chart_link\"";
}
link += ">" + translated_portion.trim() + "</a></div>";
link += ">" + get_translated_name(name_portion.trim()) + "</a></div>";

if (translated_portions.length > 1 && tmp_i < translated_portions.length - 1) {
if (name_portions.length > 1 && tmp_i < name_portions.length - 1) {
link += "<br/>+";
}

Expand Down

0 comments on commit 0f6035a

Please sign in to comment.