mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
Add control for errors.
This commit is contained in:
parent
3a505224f6
commit
0246851f41
@ -5,9 +5,9 @@ Cypress.on('window:before:load', (win) => {
|
|||||||
cy.spy(win.console, 'warn');
|
cy.spy(win.console, 'warn');
|
||||||
});
|
});
|
||||||
|
|
||||||
// // afterEach(() => {
|
// afterEach(() => {
|
||||||
// // cy.window().then((win) => {
|
// cy.window().then((win) => {
|
||||||
// // expect(win.console.error).to.have.callCount(0);
|
// expect(win.console.error).to.have.callCount(0);
|
||||||
// // expect(win.console.warn).to.have.callCount(0);
|
// expect(win.console.warn).to.have.callCount(0);
|
||||||
// // });
|
// });
|
||||||
// });
|
// });
|
||||||
|
@ -88,7 +88,7 @@ const Editor = ({
|
|||||||
model.registerEvents(setCanvasUpdate, capability);
|
model.registerEvents(setCanvasUpdate, capability);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(e);
|
console.error(JSON.stringify(e));
|
||||||
window.newrelic?.noticeError(
|
window.newrelic?.noticeError(
|
||||||
new Error(`Unexpected error loading map ${mapInfo.getId()} = ${JSON.stringify(e)}`),
|
new Error(`Unexpected error loading map ${mapInfo.getId()} = ${JSON.stringify(e)}`),
|
||||||
);
|
);
|
||||||
|
@ -494,19 +494,23 @@ class XMLSerializerTango implements XMLMindmapSerializer {
|
|||||||
|
|
||||||
const model = mindmap.createRelationship(srcId, destId);
|
const model = mindmap.createRelationship(srcId, destId);
|
||||||
model.setLineType(lineType);
|
model.setLineType(lineType);
|
||||||
|
if (srcCtrlPoint) {
|
||||||
const spoint = Point.fromString(srcCtrlPoint);
|
const spoint = Point.fromString(srcCtrlPoint);
|
||||||
if (spoint) {
|
if (spoint) {
|
||||||
model.setSrcCtrlPoint(spoint);
|
model.setSrcCtrlPoint(spoint);
|
||||||
} else {
|
} else {
|
||||||
console.error(`srcCtrlPoint could not be parsed: ${srcCtrlPoint}`);
|
console.error(`srcCtrlPoint could not be parsed: ${srcCtrlPoint}`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (destCtrlPoint) {
|
||||||
const dpoint = Point.fromString(destCtrlPoint);
|
const dpoint = Point.fromString(destCtrlPoint);
|
||||||
if (dpoint) {
|
if (dpoint) {
|
||||||
model.setDestCtrlPoint(dpoint);
|
model.setDestCtrlPoint(dpoint);
|
||||||
} else {
|
} else {
|
||||||
console.error(`destCtrlPoint could not be parsed: ${destCtrlPoint}`);
|
console.error(`destCtrlPoint could not be parsed: ${destCtrlPoint}`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
model.setEndArrow(false);
|
model.setEndArrow(false);
|
||||||
model.setStartArrow(true);
|
model.setStartArrow(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user