Skip to content

Commit

Permalink
fix: 334 bug archived read mode allows to move nodes but not persisted (
Browse files Browse the repository at this point in the history
#336)

* fix: problem solved. Navigate forward/backward caused the issue due of "caching" in rendering.

* fix: tests and issue resolved

* fix: mouse cursor for rect.node_hover_drag_root_background.readonly hover when readonly was not correctly activated
  • Loading branch information
aiAdrian authored Nov 6, 2024
1 parent bd269ec commit 6275ae1
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export class ConnectionsViewObject {
"_" +
editorView.isTemporaryDisableFilteringOfItemsInViewEnabled() +
"_" +
editorView.getLevelOfDetail();
editorView.getLevelOfDetail() +
"_" +
editorView.trainrunSectionPreviewLineView.getVariantIsWritable();

connection.getPath().forEach((p) => {
key += p.toString();
Expand Down
12 changes: 6 additions & 6 deletions src/app/view/editor-main-view/data-views/data.view.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ describe("Editor-DataView", () => {

const cvo = new ConnectionsViewObject(editorView, con, node, false, false);
expect(cvo.key).toBe(
"#2@false_15_9_false_(832,144)_(774.4,144)_(793.6,144)_(736,144)_false_false_false_0(832,144)(774.4,144)(793.6,144)(736,144)",
"#2@false_15_9_false_(832,144)_(774.4,144)_(793.6,144)_(736,144)_false_false_false_0_false(832,144)(774.4,144)(793.6,144)(736,144)",
);
});

Expand All @@ -200,10 +200,10 @@ describe("Editor-DataView", () => {
const node = nodeService.getNodeFromId(2);

const cvo1 = new NodeViewObject(editorView, node, false);
expect(cvo1.key).toBe("#2@736_64_ZUE_6_5_96_124_false_2_false_true_false_0");
expect(cvo1.key).toBe("#2@736_64_ZUE_6_5_96_124_false_2_false_true_false_0_false");

const cvo2 = new NodeViewObject(editorView, node, true);
expect(cvo2.key).toBe("#2@736_64_ZUE_6_5_96_124_false_2_true_true_false_0");
expect(cvo2.key).toBe("#2@736_64_ZUE_6_5_96_124_false_2_true_true_false_0_false");
});

it("NodeViewObject - 001", () => {
Expand All @@ -213,7 +213,7 @@ describe("Editor-DataView", () => {
const note = noteService.getNoteFromId(3);
const cvo1 = new NoteViewObject(editorView, note);
expect(cvo1.key).toBe(
"#3@1312_160_64_192_<p><em>Folgendes</em></p>spannend<p><strong>FETT</strong>_Frabcodierter Text_false_0_false_false_0",
"#3@1312_160_64_192_<p><em>Folgendes</em></p>spannend<p><strong>FETT</strong>_Frabcodierter Text_false_0_false_false_0_false",
);
});

Expand All @@ -234,7 +234,7 @@ describe("Editor-DataView", () => {
false,
);
expect(cvo1.key).toBe(
"#3@1234_false_0_39_49_1_21_39_0_39_141_39_0_39_0_20_0_S_20_7/24_4_1_0_S_20_7/24_20_0_false_false_false_false_false_false_false_false_true_true_true_false_false_true_true_0_2_true_true_true_1_false_true_true_0_false_true_true(130,80)(194,80)(254,80)(318,80)",
"#3@1234_false_0_39_49_1_21_39_0_39_141_39_0_39_0_20_0_S_20_7/24_4_1_0_S_20_7/24_20_0_false_false_false_false_false_false_false_false_true_true_true_false_false_true_true_0_false_2_true_true_true_1_false_true_true_0_false_true_true(130,80)(194,80)(254,80)(318,80)",
);
});

Expand All @@ -245,7 +245,7 @@ describe("Editor-DataView", () => {
const trans = nodeService.getNodeFromId(1).getTransitions()[0];
const cvo1 = new TransitionViewObject(editorView, trans, false);
expect(cvo1.key).toBe(
"#0@false_false_IC_60_7/24_1_3_0_IC_60_7/24_60_false_false_(320,48)(324,48)(412,48)(416,48)",
"#0@false_false_IC_60_7/24_1_3_0_IC_60_7/24_60_false_false_false(320,48)(324,48)(412,48)(416,48)",
);
});

Expand Down
4 changes: 3 additions & 1 deletion src/app/view/editor-main-view/data-views/nodeViewObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export class NodeViewObject {
"_" +
editorView.isTemporaryDisableFilteringOfItemsInViewEnabled() +
"_" +
editorView.getLevelOfDetail()
editorView.getLevelOfDetail() +
"_" +
editorView.trainrunSectionPreviewLineView.getVariantIsWritable()
);
}
}
8 changes: 4 additions & 4 deletions src/app/view/editor-main-view/data-views/nodes.view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
cursor: default;
}

::ng-deep rect.node_hover_drag_root_background.readonly {
cursor: default;
}

::ng-deep text.node_text.hover {
fill: $COLOR_Edit;
}
Expand Down Expand Up @@ -217,6 +213,10 @@
transform: translateX(-64px) translateY(-32px);
}

::ng-deep rect.node_hover_drag_root_background.readonly {
cursor: default;
}

::ng-deep path.node_edit_button {
opacity: 0.01;
stroke: None;
Expand Down
4 changes: 3 additions & 1 deletion src/app/view/editor-main-view/data-views/noteViewObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export class NoteViewObject {
"_" +
editorView.isTemporaryDisableFilteringOfItemsInViewEnabled() +
"_" +
editorView.getLevelOfDetail()
editorView.getLevelOfDetail() +
"_" +
editorView.trainrunSectionPreviewLineView.getVariantIsWritable()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export class TrainrunSectionViewObject {
"_" +
editorView.checkFilterNode(d.getTargetNode()) +
"_" +
editorView.getLevelOfDetail();
editorView.getLevelOfDetail() +
"_" +
editorView.trainrunSectionPreviewLineView.getVariantIsWritable();

cumulativeTravelTimeData.forEach((data) => {
key += "_" + data.node.getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export class TransitionViewObject {
editorView.isTemporaryDisableFilteringOfItemsInViewEnabled() +
"_" +
isMuted +
"_";
"_" +
editorView.trainrunSectionPreviewLineView.getVariantIsWritable();

transition.getPath().forEach((p) => {
key += p.toString();
Expand Down

0 comments on commit 6275ae1

Please sign in to comment.