Deploy 0.8.8

This commit is contained in:
Kevin Jahns 2016-01-18 15:40:31 +01:00
parent 65ea42481e
commit e58f633115
6 changed files with 43 additions and 21 deletions

View File

@ -4,13 +4,14 @@
Y({ Y({
db: { db: {
name: 'memory' name: 'memory',
namespace: 'richtext-example20'
}, },
connector: { connector: {
name: 'websockets-client', name: 'websockets-client',
room: 'richtext-example18', room: 'richtext-example20',
debug: true debug: true,
//url: 'http://127.0.0.1:2345' url: 'http://127.0.0.1:1234'
}, },
sourceDir: '/bower_components', sourceDir: '/bower_components',
share: { share: {
@ -30,3 +31,22 @@ Y({
// bind quill to richtext type // bind quill to richtext type
y.share.richtext.bind(window.quill) 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", "name": "yjs",
"version": "0.8.8", "version": "0.8.9",
"homepage": "y-js.org", "homepage": "y-js.org",
"authors": [ "authors": [
"Kevin Jahns <kevin.jahns@rwth-aachen.de>" "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) this.userEventListeners.push(f)
} }
userLeft (user) { userLeft (user) {
delete this.connections[user] if (this.connections[user] != null) {
if (user === this.currentSyncTarget) { delete this.connections[user]
this.currentSyncTarget = null if (user === this.currentSyncTarget) {
this.findNextSyncTarget() this.currentSyncTarget = null
} this.findNextSyncTarget()
this.syncingClients = this.syncingClients.filter(function (cli) { }
return cli !== user this.syncingClients = this.syncingClients.filter(function (cli) {
}) return cli !== user
for (var f of this.userEventListeners) {
f({
action: 'userLeft',
user: user
}) })
for (var f of this.userEventListeners) {
f({
action: 'userLeft',
user: user
})
}
} }
} }
userJoined (user, role) { 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