[Common UI] Only trigger digest on change

...from mct-split-pane.
This commit is contained in:
Victor Woeltjen
2015-09-11 13:33:17 -07:00
parent 861ea8bab7
commit 3a3829682c

View File

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