update changes requested by victor and update corresponding tests

This commit is contained in:
Deep Tailor
2017-08-29 11:27:01 -07:00
parent aa336dfd57
commit 0e3b629d90
3 changed files with 4 additions and 3 deletions

View File

@ -166,13 +166,14 @@ define(
// Getter-setter for the pixel offset of the splitter,
// relative to the current edge.
function getSetPosition(value) {
var prior = position;
if (typeof value === 'number') {
position = value;
enforceExtrema();
updateElementPositions();
// Pass change up so this state can be shared
if (positionParsed.assign) {
if (positionParsed.assign && position !== prior) {
positionParsed.assign($scope, position);
}
}

View File

@ -57,7 +57,7 @@ define(
// Update the position of this splitter
newPosition = initialPosition + pixelDelta;
mctSplitPane.position(newPosition);
mctSplitPane.position(initialPosition, newPosition);
},
// Grab the event when the user is done moving
// the splitter and pass it on