diff --git a/frontend/app/components/Session_/Player/Overlay/ElementsMarker.tsx b/frontend/app/components/Session_/Player/Overlay/ElementsMarker.tsx
index 0acb7716b..99499cac6 100644
--- a/frontend/app/components/Session_/Player/Overlay/ElementsMarker.tsx
+++ b/frontend/app/components/Session_/Player/Overlay/ElementsMarker.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import Marker from './ElementsMarker/Marker';
export default function ElementsMarker({ targets, activeIndex }) {
- return targets && targets.map(t => )
+ return targets && targets.map(t => )
}
diff --git a/frontend/app/components/Session_/Player/Overlay/ElementsMarker/Marker.tsx b/frontend/app/components/Session_/Player/Overlay/ElementsMarker/Marker.tsx
index 66ed9f2e7..92568ff49 100644
--- a/frontend/app/components/Session_/Player/Overlay/ElementsMarker/Marker.tsx
+++ b/frontend/app/components/Session_/Player/Overlay/ElementsMarker/Marker.tsx
@@ -18,8 +18,8 @@ export default function Marker({ target, active }: Props) {
height: `${ target.boundingRect.height }px`,
}
return (
-
activeTarget(target.index - 1)}>
-
{target.index}
+
activeTarget(target.index)}>
+
{target.index + 1}
{
const reducer = (state = initialState, action = {}) => {
switch (action.type) {
+ case RESET_PASSWORD.SUCCESS:
case UPDATE_PASSWORD.SUCCESS:
case LOGIN.SUCCESS:
return setClient(
diff --git a/frontend/app/player/MessageDistributor/StatedScreen/StatedScreen.ts b/frontend/app/player/MessageDistributor/StatedScreen/StatedScreen.ts
index e5b3c400c..26e2051c5 100644
--- a/frontend/app/player/MessageDistributor/StatedScreen/StatedScreen.ts
+++ b/frontend/app/player/MessageDistributor/StatedScreen/StatedScreen.ts
@@ -101,21 +101,23 @@ export default class StatedScreen extends Screen {
setMarkedTargets(selections: { selector: string, count: number }[] | null) {
if (selections) {
const targets: MarkedTarget[] = [];
- const totalCount = selections.reduce((a, b) => {
- return a + b.count
- }, 0);
- selections.forEach((s, index) => {
+ let index = 0;
+ selections.forEach((s) => {
const el = this.getElementBySelector(s.selector);
if (!el) return;
targets.push({
...s,
el,
- index,
- percent: Math.round((s.count * totalCount) / 100),
+ index: index++,
+ percent: 0,
boundingRect: this.calculateRelativeBoundingRect(el),
})
});
- update({ markedTargets: targets });
+
+ const totalCount = targets.reduce((a, b) => {
+ return a + b.count
+ }, 0);
+ update({ markedTargets: targets.map(i => ({...i, percent: Math.round((i.count * 100) / totalCount) })) });
} else {
update({ markedTargets: null });
}