[Timeline] Fix reordering

Fix reordering behavior when dragging-and-dropping within timelines;
addresses #789.
This commit is contained in:
Victor Woeltjen
2016-03-29 19:41:43 -07:00
parent cbea842c8b
commit 530b940a64
2 changed files with 23 additions and 10 deletions

View File

@@ -206,6 +206,7 @@ define(
it("allows reordering within a parent", function () {
var testModel = { composition: [ 'x', 'b', 'y', 'd' ] };
mockSwimlane.highlightBottom.andReturn(true);
mockSwimlane.expanded = true;
mockSwimlane.children = [];
@@ -225,6 +226,16 @@ define(
});
});
it("does not invoke an action when reordering", function () {
mockSwimlane.highlightBottom.andReturn(true);
mockSwimlane.expanded = true;
mockSwimlane.children = [];
mockContext.getParent
.andReturn(mockSwimlane.parent.domainObject);
handler.drop('d', mockOtherObject);
expect(mockAction.perform).not.toHaveBeenCalled();
});
});
}
);