Release 11.2.2
This commit is contained in:
parent
74c881bb5b
commit
3b0d0343f4
2
dist
2
dist
@ -1 +1 @@
|
|||||||
Subproject commit 5ab60028ce3cdabbefcce00a217155d9a209a0f6
|
Subproject commit 653a436b8874ea2fd329404f1bd92fd3c808595e
|
@ -48,8 +48,8 @@ module.exports = function (gulp, helperOptions) {
|
|||||||
.pipe(source(options.targetName))
|
.pipe(source(options.targetName))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe($.sourcemaps.init({loadMaps: true}))
|
.pipe($.sourcemaps.init({loadMaps: true}))
|
||||||
.pipe($.if(!options.debug, $.uglify().on('error', function(e) {
|
.pipe($.if(!options.debug, $.uglify().on('error', function (e) {
|
||||||
console.log('\x07',e.message, JSON.stringify(e)); return this.end()
|
console.log('\x07', e.message, JSON.stringify(e)); return this.end()
|
||||||
})))
|
})))
|
||||||
.pipe($.sourcemaps.write('.'))
|
.pipe($.sourcemaps.write('.'))
|
||||||
.pipe(gulp.dest('./dist/')))
|
.pipe(gulp.dest('./dist/')))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "11.2.1",
|
"version": "11.2.2",
|
||||||
"description": "A framework for real-time p2p shared editing on arbitrary complex data types",
|
"description": "A framework for real-time p2p shared editing on arbitrary complex data types",
|
||||||
"main": "./src/y.js",
|
"main": "./src/y.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -27,20 +27,19 @@ g.g = g
|
|||||||
// Helper methods for the random number generator
|
// Helper methods for the random number generator
|
||||||
Math.seedrandom = require('seedrandom')
|
Math.seedrandom = require('seedrandom')
|
||||||
|
|
||||||
g.generateRandomSeed = function generateRandomSeed() {
|
g.generateRandomSeed = function generateRandomSeed () {
|
||||||
var seed
|
var seed
|
||||||
if (typeof window != 'undefined' && window.location.hash.length > 1) {
|
if (typeof window !== 'undefined' && window.location.hash.length > 1) {
|
||||||
seed = window.location.hash.slice(1) // first character is the hash!
|
seed = window.location.hash.slice(1) // first character is the hash!
|
||||||
console.warn('Using random seed that was specified in the url!')
|
console.warn('Using random seed that was specified in the url!')
|
||||||
} else {
|
} else {
|
||||||
seed = JSON.stringify(Math.random())
|
seed = JSON.stringify(Math.random())
|
||||||
}
|
}
|
||||||
console.info('Using random seed: ' + seed)
|
console.info('Using random seed: ' + seed)
|
||||||
setRandomSeed(seed)
|
g.setRandomSeed(seed)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g.setRandomSeed = function setRandomSeed(seed) {
|
g.setRandomSeed = function setRandomSeed (seed) {
|
||||||
Math.seedrandom.currentSeed = seed
|
Math.seedrandom.currentSeed = seed
|
||||||
Math.seedrandom(Math.seedrandom.currentSeed, { global: true })
|
Math.seedrandom(Math.seedrandom.currentSeed, { global: true })
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ module.exports = function (Y /* : any*/) {
|
|||||||
this.onevent(op)
|
this.onevent(op)
|
||||||
} else if (op.struct === 'Delete') {
|
} else if (op.struct === 'Delete') {
|
||||||
var self = this
|
var self = this
|
||||||
function checkDelete (d) {
|
var checkDelete = function checkDelete (d) {
|
||||||
if (d.length == null) {
|
if (d.length == null) {
|
||||||
throw new Error('This shouldn\'t happen! d.length must be defined!')
|
throw new Error('This shouldn\'t happen! d.length must be defined!')
|
||||||
}
|
}
|
||||||
@ -205,7 +205,7 @@ module.exports = function (Y /* : any*/) {
|
|||||||
*/
|
*/
|
||||||
if (iEnd < dEnd) {
|
if (iEnd < dEnd) {
|
||||||
// Case 7
|
// Case 7
|
||||||
debugger
|
// debugger // TODO: You did not test this case yet!!!! (add the debugger here)
|
||||||
self.waiting.splice(w, 1)
|
self.waiting.splice(w, 1)
|
||||||
checkDelete({
|
checkDelete({
|
||||||
target: [d.target[0], dStart],
|
target: [d.target[0], dStart],
|
||||||
@ -336,7 +336,7 @@ module.exports = function (Y /* : any*/) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (var i = 0; i < dels.length; i++) {
|
for (i = 0; i < dels.length; i++) {
|
||||||
if (this.awaiting === 0) {
|
if (this.awaiting === 0) {
|
||||||
this.onevent(dels[i])
|
this.onevent(dels[i])
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user