Skip to content
Snippets Groups Projects
Unverified Commit 9c0d7b05 authored by Anton Georgiev's avatar Anton Georgiev Committed by GitHub
Browse files

Merge pull request #11187 from jfsiebel/configurable-annotation-cursor-interval

Configurable annotation and cursor interval
parents 0ba3aa71 fa0fd8a0
No related branches found
No related tags found
No related merge requests found
......@@ -5,12 +5,14 @@ import Metrics from '/imports/startup/server/metrics';
const { queueMetrics } = Meteor.settings.private.redis.metrics;
const ANNOTATION_PROCCESS_INTERVAL = 60;
const {
annotationsQueueProcessInterval: ANNOTATION_PROCESS_INTERVAL,
} = Meteor.settings.public.whiteboard;
let annotationsQueue = {};
let annotationsRecieverIsRunning = false;
const proccess = () => {
const process = () => {
if (!Object.keys(annotationsQueue).length) {
annotationsRecieverIsRunning = false;
return;
......@@ -24,7 +26,7 @@ const proccess = () => {
});
annotationsQueue = {};
Meteor.setTimeout(proccess, ANNOTATION_PROCCESS_INTERVAL);
Meteor.setTimeout(process, ANNOTATION_PROCESS_INTERVAL);
};
export default function handleWhiteboardSend({ header, body }, meetingId) {
......@@ -45,7 +47,7 @@ export default function handleWhiteboardSend({ header, body }, meetingId) {
if (queueMetrics) {
Metrics.setAnnotationQueueLength(meetingId, annotationsQueue[meetingId].length);
}
if (!annotationsRecieverIsRunning) proccess();
if (!annotationsRecieverIsRunning) process();
return addAnnotation(meetingId, whiteboardId, userId, annotation);
}
......@@ -2,9 +2,10 @@ import React, { Component } from 'react';
import { throttle } from 'lodash';
import PropTypes from 'prop-types';
const { cursorInterval: CURSOR_INTERVAL } = Meteor.settings.public.whiteboard;
// maximum value of z-index to prevent other things from overlapping
const MAX_Z_INDEX = (2 ** 31) - 1;
const CURSOR_INTERVAL = 40;
export default class CursorListener extends Component {
static touchCenterPoint(touches) {
......
......@@ -368,6 +368,8 @@ public:
role_moderator: MODERATOR
role_viewer: VIEWER
whiteboard:
annotationsQueueProcessInterval: 60
cursorInterval: 40
annotations:
status:
start: DRAW_START
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment