See other users' cursor position

This commit is contained in:
yflory
2018-12-04 17:18:42 +01:00
parent 60e7011adc
commit 1ba80a344b
10 changed files with 165 additions and 3 deletions

View File

@@ -792,6 +792,22 @@ define([
cfg.addRpc(sframeChan, Cryptpad, Utils);
}
sframeChan.on('Q_CURSOR_OPENCHANNEL', function (data, cb) {
Cryptpad.cursor.execCommand({
cmd: 'INIT_CURSOR',
data: {
channel: data,
secret: secret
}
}, cb);
});
Cryptpad.cursor.onEvent.reg(function (data) {
sframeChan.event('EV_CURSOR_EVENT', data);
});
sframeChan.on('Q_CURSOR_COMMAND', function (data, cb) {
Cryptpad.cursor.execCommand(data, cb);
});
if (cfg.messaging) {
Notifier.getPermission();