diff --git a/ui/src/App.js b/ui/src/App.js index a92e76ed9..2b319f634 100644 --- a/ui/src/App.js +++ b/ui/src/App.js @@ -108,6 +108,12 @@ function App() { function onSimClick() { dispatch({ type: 'iterationResults', value: null }) + dispatch({ type: 'resultsResourceUsageByAbility', value: null }) + dispatch({ type: 'resultsByBuff', value: null }) + dispatch({ type: 'resultsByDebuff', value: null }) + dispatch({ type: 'resultsByDamageType', value: null }) + dispatch({ type: 'resultsByAbility', value: null }) + dispatch({ type: 'resultsDps', value: null }) sim() } diff --git a/ui/src/rankings/rankings.js b/ui/src/rankings/rankings.js index 14ecf4be0..713a329dc 100644 --- a/ui/src/rankings/rankings.js +++ b/ui/src/rankings/rankings.js @@ -61,7 +61,7 @@ const RankingBarChart = ({ data }) => ( tickSize: 5, tickPadding: 5, tickRotation: 0, - legend: 'DPS', + legend: 'DPS (3 minutes)', itemTextColor: '#fff', legendPosition: 'middle', legendOffset: -40 diff --git a/ui/src/rotation/rotation.js b/ui/src/rotation/rotation.js index 8a66cbfe5..3d7860feb 100644 --- a/ui/src/rotation/rotation.js +++ b/ui/src/rotation/rotation.js @@ -18,7 +18,7 @@ export default function({ rotation, dispatch }) { try { const parsed = JSON.parse(rotationStr); setJsonValid(true); - dispatch({ type: 'character.rotation', value: parsed }); + dispatch({ type: 'setRotation', value: parsed }); } catch(e) { setJsonValid(false); } diff --git a/ui/src/state.js b/ui/src/state.js index db6251384..39d0b8f84 100644 --- a/ui/src/state.js +++ b/ui/src/state.js @@ -92,7 +92,23 @@ export function stateReducer(state, action) { [action.value.name]: action.value.value } } - } else { + } else if(action.type == 'setRotation') { + newState = { + ...state, + character: { + ...state.character, + rotation: action.value + } + } + } else if(action.type == 'setTalents') { + newState = { + ...state, + character: { + ...state.character, + talents: action.value + } + } + } else { console.warn(`Unhandled action type: ${action.type}`); } } diff --git a/ui/src/talents/talents.js b/ui/src/talents/talents.js index 0e4efcffa..72a5490fc 100644 --- a/ui/src/talents/talents.js +++ b/ui/src/talents/talents.js @@ -18,7 +18,7 @@ export default function({ talents, dispatch }) { try { const parsed = JSON.parse(talentsStr); setJsonValid(true); - dispatch({ type: 'character.talents', value: parsed }); + dispatch({ type: 'setRotation', value: parsed }); } catch(e) { setJsonValid(false); }