Merge remote-tracking branch 'github-open/open384' into open-master

This commit is contained in:
Pete Richards 2015-12-08 15:18:21 -08:00
commit 89a93e2966
2 changed files with 19 additions and 0 deletions

View File

@ -85,6 +85,8 @@ define(
$scope.commit("Dropped a frame.");
}
// Populate template-facing position for this id
self.rawPositions[id] =
$scope.configuration.panels[id];
self.populatePosition(id);
// Layout may contain embedded views which will
// listen for drops, so call preventDefault() so

View File

@ -274,6 +274,23 @@ define(
expect(parseInt(style.width, 10)).toBeGreaterThan(63);
expect(parseInt(style.height, 10)).toBeGreaterThan(31);
});
it("updates positions of existing objects on a drop", function () {
var oldStyle;
mockScope.$watchCollection.mostRecentCall.args[1]();
oldStyle = controller.getFrameStyle("b");
expect(oldStyle).toBeDefined();
// ...drop event...
mockScope.$on.mostRecentCall
.args[1](mockEvent, 'b', { x: 300, y: 100 });
expect(controller.getFrameStyle("b"))
.not.toEqual(oldStyle);
});
});
}
);