Compare commits

..

2 Commits

Author SHA1 Message Date
Kevin Jahns
e58f633115 Deploy 0.8.8 2016-01-18 15:40:31 +01:00
Kevin Jahns
65ea42481e Deploy 0.8.7 2016-01-16 01:45:53 +01:00
6 changed files with 44 additions and 22 deletions

View File

@@ -4,13 +4,14 @@
Y({
db: {
name: 'memory'
name: 'memory',
namespace: 'richtext-example20'
},
connector: {
name: 'y-websockets-client',
room: 'richtext-example18',
debug: true
//url: 'http://127.0.0.1:2345'
name: 'websockets-client',
room: 'richtext-example20',
debug: true,
url: 'http://127.0.0.1:1234'
},
sourceDir: '/bower_components',
share: {
@@ -30,3 +31,22 @@ Y({
// bind quill to richtext type
y.share.richtext.bind(window.quill)
})
Y({
db: {
name: 'memory',
namespace: 'richtext-example220'
},
connector: {
name: 'websockets-client',
room: 'richtext-example22'
// debug: true,
// url: 'http://127.0.0.1:1234'
},
sourceDir: '/bower_components',
share: {
richtext: 'Richtext' // y.share.richtext is of type Y.Richtext
}
}).then(function (y) {
window.y = y
})

View File

@@ -1,6 +1,6 @@
{
"name": "yjs",
"version": "0.8.7",
"version": "0.8.9",
"homepage": "y-js.org",
"authors": [
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"

26
y.es6
View File

@@ -76,19 +76,21 @@ module.exports = function (Y/* :any */) {
this.userEventListeners.push(f)
}
userLeft (user) {
delete this.connections[user]
if (user === this.currentSyncTarget) {
this.currentSyncTarget = null
this.findNextSyncTarget()
}
this.syncingClients = this.syncingClients.filter(function (cli) {
return cli !== user
})
for (var f of this.userEventListeners) {
f({
action: 'userLeft',
user: user
if (this.connections[user] != null) {
delete this.connections[user]
if (user === this.currentSyncTarget) {
this.currentSyncTarget = null
this.findNextSyncTarget()
}
this.syncingClients = this.syncingClients.filter(function (cli) {
return cli !== user
})
for (var f of this.userEventListeners) {
f({
action: 'userLeft',
user: user
})
}
}
}
userJoined (user, role) {

File diff suppressed because one or more lines are too long

4
y.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long