Minor tweaks concerning IE11
This commit is contained in:
parent
f5696fb5be
commit
e5391cdb97
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@recogito/recogito-client-core",
|
"name": "@recogito/recogito-client-core",
|
||||||
"version": "0.1.7",
|
"version": "0.1.9",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -8632,9 +8632,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"uuid": {
|
"uuid": {
|
||||||
"version": "8.2.0",
|
"version": "8.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz",
|
||||||
"integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q=="
|
"integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ=="
|
||||||
},
|
},
|
||||||
"v8-compile-cache": {
|
"v8-compile-cache": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
|
|
|
@ -49,6 +49,6 @@
|
||||||
"react-transition-group": "^4.3.0",
|
"react-transition-group": "^4.3.0",
|
||||||
"timeago-react": "^3.0.0",
|
"timeago-react": "^3.0.0",
|
||||||
"tiny-emitter": "^2.1.0",
|
"tiny-emitter": "^2.1.0",
|
||||||
"uuid": "^8.2.0"
|
"uuid": "^8.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,12 +10,12 @@ export default class RelationsLayer extends EventEmitter {
|
||||||
constructor(contentEl) {
|
constructor(contentEl) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.connections = [];
|
this.connections = [];
|
||||||
|
|
||||||
this.contentEl = contentEl;
|
this.contentEl = contentEl;
|
||||||
|
|
||||||
this.svg = document.createElementNS(CONST.NAMESPACE, 'svg');
|
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.contentEl.appendChild(this.svg);
|
||||||
|
|
||||||
this.drawingTool = new DrawingTool(contentEl, this.svg);
|
this.drawingTool = new DrawingTool(contentEl, this.svg);
|
||||||
|
@ -33,7 +33,7 @@ export default class RelationsLayer extends EventEmitter {
|
||||||
/** Shorthand **/
|
/** Shorthand **/
|
||||||
createConnection = annotation => {
|
createConnection = annotation => {
|
||||||
const c = new Connection(this.contentEl, this.svg, annotation);
|
const c = new Connection(this.contentEl, this.svg, annotation);
|
||||||
|
|
||||||
// Forward click event as selection, unless we're read-only
|
// Forward click event as selection, unless we're read-only
|
||||||
c.on('click', relation => this.emit('selectRelation', relation));
|
c.on('click', relation => this.emit('selectRelation', relation));
|
||||||
|
|
||||||
|
@ -62,9 +62,9 @@ export default class RelationsLayer extends EventEmitter {
|
||||||
conn.recompute();
|
conn.recompute();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
addOrUpdateRelation = (relation, maybePrevious) => {
|
addOrUpdateRelation = (relation, maybePrevious) => {
|
||||||
const previous = maybePrevious ?
|
const previous = maybePrevious ?
|
||||||
this.connections.find(c => c.matchesRelation(relation)) : null;
|
this.connections.find(c => c.matchesRelation(relation)) : null;
|
||||||
|
|
||||||
if (previous) {
|
if (previous) {
|
||||||
|
@ -152,9 +152,9 @@ export default class RelationsLayer extends EventEmitter {
|
||||||
|
|
||||||
set readOnly(readOnly) {
|
set readOnly(readOnly) {
|
||||||
if (readOnly)
|
if (readOnly)
|
||||||
this.svg.classList.add('readonly');
|
this.svg.setAttribute('class', 'r6o-relations-layer readonly');
|
||||||
else
|
else
|
||||||
this.svg.classList.remove('readonly');
|
this.svg.setAttribute('class', 'r6o-relations-layer');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue