documentatie
This commit is contained in:
@@ -292,6 +292,19 @@ export class CmapWorkspaceController {
|
||||
return text.length > 150 ? `${text.slice(0, 147)}…` : text;
|
||||
}
|
||||
|
||||
function showCmapDescriptionTooltip(button) {
|
||||
const item = button.closest("[data-rw-cmap-item-id]");
|
||||
const editor = cmapPrototypeState().editor;
|
||||
const record = item && editor ? editor.itemRecord(Number(item.dataset.rwCmapItemId)) : null;
|
||||
if (record?.descriptionPageSlug) {
|
||||
cmapDescriptionPreview.show(button, record.descriptionPageSlug, tr("loading", "Loading…"));
|
||||
}
|
||||
}
|
||||
|
||||
function hideCmapDescriptionTooltip() {
|
||||
cmapDescriptionPreview.hide();
|
||||
}
|
||||
|
||||
function addCmapPrototypeNode(options = {}) {
|
||||
return conceptController.addNode(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user