refactoring van de cmap structuren bijna compleet
This commit is contained in:
@@ -88,7 +88,7 @@ async function loadEditorFactory() {
|
||||
clearTimeout,
|
||||
requestAnimationFrame: (callback) => callback()
|
||||
};
|
||||
await import("../static/cmap/cmap-racket-wiki.js");
|
||||
await import("../static/js/cmap/cmap-racket-wiki.js");
|
||||
global.window.RacketWikiCmap = global.window.RacketWikiCmap || previousFactory;
|
||||
return global.window.RacketWikiCmap;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ test("a dragged connector endpoint survives collapsing and expanding its submap"
|
||||
}]);
|
||||
});
|
||||
|
||||
test("moving a concept also moves connected concepts that link to another CMap", async () => {
|
||||
test("moving a concept does not move connected concepts or linking phrases", async () => {
|
||||
const factory = await loadEditorFactory();
|
||||
const map = {
|
||||
onSelection() {},
|
||||
@@ -206,7 +206,7 @@ test("moving a concept also moves connected concepts that link to another CMap",
|
||||
editor.addConnector(phrase, linked, true, { id: 2 });
|
||||
|
||||
editor.selectItem(owner);
|
||||
editor.handleItemMove(owner, 180, 140);
|
||||
owner.node.attr(editor.handleItemMove(owner, 180, 140));
|
||||
|
||||
assert.deepEqual({
|
||||
owner: [owner.node.attr("x"), owner.node.attr("y")],
|
||||
@@ -214,8 +214,8 @@ test("moving a concept also moves connected concepts that link to another CMap",
|
||||
linked: [linked.node.attr("x"), linked.node.attr("y")]
|
||||
}, {
|
||||
owner: [180, 140],
|
||||
phrase: [340, 140],
|
||||
linked: [500, 140]
|
||||
phrase: [260, 100],
|
||||
linked: [420, 100]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user