Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
feat: fetch pointer image by color name
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossantos74 committed Jul 4, 2024
1 parent 27104a4 commit 975c475
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/common/types/meeting-colors.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const NAME_IS_WHITE_TEXT = [
'lightsea',
'teal',
'cadetblue',
'slategray',
'pastelblue',
'mediumslateblue',
'bluedark',
'navy',
Expand All @@ -27,6 +27,7 @@ export const NAME_IS_WHITE_TEXT = [
'vibrantpink',
'paleredviolet',
'carmine',
'wine',
];

export const MEETING_COLORS = {
Expand Down Expand Up @@ -55,7 +56,7 @@ export const MEETING_COLORS = {
seagreen: '#04B45F',
palegreen: '#8DE990',
saddlebrown: '#964C42',
mediumgray: '#AFAFAF',
pastelblue: '#77A1CC',
palesilver: '#D2BABA',
coral: '#DF6B6B',
bisque: '#FFD9C4',
Expand All @@ -65,7 +66,7 @@ export const MEETING_COLORS = {
mint: '#ADE6DF',
lightsea: '#45AFAA',
teal: '#036E6E',
slategray: '#708090',
wine: '#760040',
cyan: '#00FFFF',
mediumslateblue: '#6674D7',
navy: '#0013BB',
Expand Down
2 changes: 1 addition & 1 deletion src/components/presence-mouse/canvas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export class PointersCanvas extends BaseComponent {
const pointerUser = divPointer.getElementsByClassName('pointer-mouse')[0] as HTMLDivElement;

if (pointerUser) {
pointerUser.style.backgroundImage = `url(https://production.cdn.superviz.com/static/pointers-v2/${mouse.slot.index}.svg)`;
pointerUser.style.backgroundImage = `url(https://production.cdn.superviz.com/static/mouse-pointers/${mouse.slot.colorName}.svg)`;
}

if (mouseUser) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/presence-mouse/html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ export class PointersHTML extends BaseComponent {
const pointerUser = mouseFollower.getElementsByClassName('pointer-mouse')[0] as HTMLDivElement;

if (pointerUser) {
pointerUser.style.backgroundImage = `url(https://production.cdn.superviz.com/static/pointers-v2/${participant.slot.index}.svg)`;
pointerUser.style.backgroundImage = `url(https://production.cdn.superviz.com/static/mouse-pointers/${participant.slot.colorName}.svg)`;
}

if (mouseUser) {
Expand Down

0 comments on commit 975c475

Please sign in to comment.