Compare commits

..

1 Commits

Author SHA1 Message Date
Kevin Jahns
16e01ad3d5 v13.0.0-41 -- distribution files 2017-12-14 14:30:17 +01:00
9 changed files with 15 additions and 33 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "yjs",
"version": "13.0.0-42",
"version": "13.0.0-41",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "yjs",
"version": "13.0.0-42",
"version": "13.0.0-41",
"description": "A framework for real-time p2p shared editing on any data",
"main": "./y.node.js",
"browser": "./y.js",

View File

@@ -207,12 +207,8 @@ export default class YArray extends Type {
prevJsonIns._content.push(c)
}
}
if (prevJsonIns !== null) {
if (y !== null) {
prevJsonIns._integrate(y)
} else if (prevJsonIns._left === null) {
this._start = prevJsonIns
}
if (prevJsonIns !== null && y !== null) {
prevJsonIns._integrate(y)
}
})
}

View File

@@ -24,11 +24,6 @@ export default class YXmlHook extends YMap {
}
return this._dom
}
_unbindFromDom () {
this._dom._yxml = null
this._yxml = null
// TODO: cleanup hook?
}
_fromBinary (y, decoder) {
const missing = super._fromBinary(y, decoder)
this.hookName = decoder.readVarString()

View File

@@ -174,7 +174,7 @@ export function reflectChangesOnDom (events, _document) {
// let anchorViewPosition = getAnchorViewPosition(yxml._scrollElement)
if (yxml.constructor === YXmlText) {
yxml._dom.nodeValue = yxml.toString()
} else if (event.attributesChanged !== undefined) {
} else {
// update attributes
event.attributesChanged.forEach(attributeName => {
const value = yxml.getAttribute(attributeName)

8
y.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
/**
* yjs - A framework for real-time p2p shared editing on any data
* @version v13.0.0-42
* @version v13.0.0-41
* @license MIT
*/
@@ -2406,12 +2406,8 @@ class YArray extends Type {
prevJsonIns._content.push(c);
}
}
if (prevJsonIns !== null) {
if (y !== null) {
prevJsonIns._integrate(y);
} else if (prevJsonIns._left === null) {
this._start = prevJsonIns;
}
if (prevJsonIns !== null && y !== null) {
prevJsonIns._integrate(y);
}
});
}
@@ -2764,7 +2760,7 @@ function reflectChangesOnDom (events, _document) {
// let anchorViewPosition = getAnchorViewPosition(yxml._scrollElement)
if (yxml.constructor === YXmlText) {
yxml._dom.nodeValue = yxml.toString();
} else if (event.attributesChanged !== undefined) {
} else {
// update attributes
event.attributesChanged.forEach(attributeName => {
const value = yxml.getAttribute(attributeName);
@@ -4241,11 +4237,6 @@ class YXmlHook extends YMap {
}
return this._dom
}
_unbindFromDom () {
this._dom._yxml = null;
this._yxml = null;
// TODO: cleanup hook?
}
_fromBinary (y, decoder) {
const missing = super._fromBinary(y, decoder);
this.hookName = decoder.readVarString();

File diff suppressed because one or more lines are too long