diff --git a/platform/commonUI/general/src/directives/MCTSplitPane.js b/platform/commonUI/general/src/directives/MCTSplitPane.js index cb845ed1bd..0262d6f0a2 100644 --- a/platform/commonUI/general/src/directives/MCTSplitPane.js +++ b/platform/commonUI/general/src/directives/MCTSplitPane.js @@ -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); } } diff --git a/platform/commonUI/general/src/directives/MCTSplitter.js b/platform/commonUI/general/src/directives/MCTSplitter.js index 69db2f0a02..315a00fad2 100644 --- a/platform/commonUI/general/src/directives/MCTSplitter.js +++ b/platform/commonUI/general/src/directives/MCTSplitter.js @@ -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 diff --git a/platform/commonUI/general/test/directives/MCTSplitterSpec.js b/platform/commonUI/general/test/directives/MCTSplitterSpec.js index caf0fd468d..c0550d0975 100644 --- a/platform/commonUI/general/test/directives/MCTSplitterSpec.js +++ b/platform/commonUI/general/test/directives/MCTSplitterSpec.js @@ -94,7 +94,7 @@ define( it("repositions during drag", function () { mockScope.splitter.move([10, 0]); expect(mockSplitPane.position) - .toHaveBeenCalledWith(testPosition + 10); + .toHaveBeenCalledWith(testPosition, testPosition + 10); }); it("tell's the splitter when it is done resizing", function () {