mirror of
https://github.com/cudr/slate-collaborative.git
synced 2026-03-02 03:40:18 +00:00
feat: garbage cursors on client
This commit is contained in:
@@ -16,7 +16,7 @@ class Connection {
|
||||
private options: ConnectionOptions
|
||||
|
||||
constructor(options: ConnectionOptions = defaultOptions) {
|
||||
this.io = io(options.port, options.connectOpts)
|
||||
this.io = io(options.entry, options.connectOpts)
|
||||
this.docSet = new Automerge.DocSet()
|
||||
this.connections = {}
|
||||
this.options = merge(defaultOptions, options)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { ValueJSON } from 'slate'
|
||||
import { Server } from 'http'
|
||||
|
||||
export interface ConnectionOptions {
|
||||
port: number
|
||||
entry: number | Server
|
||||
connectOpts?: SocketIO.ServerOptions
|
||||
defaultValue?: ValueJSON
|
||||
saveTreshold?: number
|
||||
|
||||
@@ -6,7 +6,7 @@ export const getClients = (io, nsp) =>
|
||||
})
|
||||
|
||||
export const defaultOptions = {
|
||||
port: 9000,
|
||||
entry: 9000,
|
||||
saveTreshold: 2000,
|
||||
cursorAnnotationType: 'collaborative_selection'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user