[Common UI] Only trigger digest on change
...from mct-split-pane.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user