Minor tweaks concerning IE11

This commit is contained in:
Rainer Simon 2020-08-29 14:26:48 +02:00
parent f5696fb5be
commit e5391cdb97
3 changed files with 12 additions and 12 deletions

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@recogito/recogito-client-core",
"version": "0.1.7",
"version": "0.1.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -8632,9 +8632,9 @@
"dev": true
},
"uuid": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz",
"integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q=="
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz",
"integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ=="
},
"v8-compile-cache": {
"version": "2.0.3",

View File

@ -49,6 +49,6 @@
"react-transition-group": "^4.3.0",
"timeago-react": "^3.0.0",
"tiny-emitter": "^2.1.0",
"uuid": "^8.2.0"
"uuid": "^8.3.0"
}
}

View File

@ -10,12 +10,12 @@ export default class RelationsLayer extends EventEmitter {
constructor(contentEl) {
super();
this.connections = [];
this.connections = [];
this.contentEl = contentEl;
this.svg = document.createElementNS(CONST.NAMESPACE, 'svg');
this.svg.classList.add('r6o-relations-layer');
this.svg.setAttribute('class', 'r6o-relations-layer');
this.contentEl.appendChild(this.svg);
this.drawingTool = new DrawingTool(contentEl, this.svg);
@ -33,7 +33,7 @@ export default class RelationsLayer extends EventEmitter {
/** Shorthand **/
createConnection = annotation => {
const c = new Connection(this.contentEl, this.svg, annotation);
// Forward click event as selection, unless we're read-only
c.on('click', relation => this.emit('selectRelation', relation));
@ -62,9 +62,9 @@ export default class RelationsLayer extends EventEmitter {
conn.recompute();
});
}
addOrUpdateRelation = (relation, maybePrevious) => {
const previous = maybePrevious ?
const previous = maybePrevious ?
this.connections.find(c => c.matchesRelation(relation)) : null;
if (previous) {
@ -152,9 +152,9 @@ export default class RelationsLayer extends EventEmitter {
set readOnly(readOnly) {
if (readOnly)
this.svg.classList.add('readonly');
this.svg.setAttribute('class', 'r6o-relations-layer readonly');
else
this.svg.classList.remove('readonly');
this.svg.setAttribute('class', 'r6o-relations-layer');
}
}