cssClass is now added also to link map and relation map, closes #1702

This commit is contained in:
zadam 2021-03-02 23:20:53 +01:00
parent 14ced949a9
commit b9422b0efd
2 changed files with 6 additions and 1 deletions

View File

@ -117,7 +117,8 @@ export default class LinkMap {
const $noteBox = $("<div>")
.addClass("note-box")
.prop("id", noteBoxId);
.prop("id", noteBoxId)
.addClass(note.getCssClass());
const $link = $linkTitles[noteId];

View File

@ -7,6 +7,7 @@ import attributeAutocompleteService from "../../services/attribute_autocomplete.
import TypeWidget from "./type_widget.js";
import appContext from "../../services/app_context.js";
import utils from "../../services/utils.js";
import treeCache from "../../services/tree_cache.js";
const uniDirectionalOverlays = [
[ "Arrow", {
@ -531,8 +532,11 @@ export default class RelationMapTypeWidget extends TypeWidget {
linkService.goToLink(e);
});
const note = await treeCache.getNote(noteId);
const $noteBox = $("<div>")
.addClass("note-box")
.addClass(note.getCssClass())
.prop("id", this.noteIdToId(noteId))
.append($("<span>").addClass("title").append($link))
.append($("<div>").addClass("endpoint").attr("title", "Start dragging relations from here and drop them on another note."))