Error marker location opened. Error marker css class toggles.

This commit is contained in:
BoykoAlex
2019-11-22 12:52:55 -05:00
parent 7f48adf92e
commit c1348124a9
2 changed files with 11 additions and 12 deletions

View File

@@ -893,16 +893,13 @@ export class EditorComponent implements OnInit, OnDestroy {
kind: Constants.ERROR_DECORATION_KIND,
messages: errorMessages
});
let pt: dia.Point;
const view = this.paper.findViewByModel(error);
if (cell instanceof joint.dia.Element) {
pt = (<dia.Element> cell).getBBox().topRight().offset(-error.get('size').width, 0);
error.set('position', pt);
(<dia.ElementView>view).setInteractivity(false);
} else {
// TODO: do something for the link perhaps?
}
view.setInteractivity(false);
}
const cellView = this.paper.findViewByModel(cell);
if (cellView) {
joint.V(cellView.el).toggleClass('marker-error', errorMessages.length);
}
}