Skip to content
Browse files

Fixes comments, tidies whitespace.

  • Loading branch information...
1 parent 5ac17ed commit 7040df46df660399f8b31624fe34a0fa33a80ed1 @publickeating publickeating committed
View
2 frameworks/core_foundation/child_view_layouts/horizontal_stack_layout.js
@@ -274,12 +274,12 @@ SC.mixin(SC.View,
marginAfter = lastMargin || spacing;
}
- // Adjust our frame to fit as well, this ensures that scrolling works.
// If the current size is 0 (all children are hidden), it doesn't make sense to add the padding
if (position !== 0) {
position += Math.max(lastMargin, paddingAfter);
}
+ // Adjust our frame to fit as well, this ensures that scrolling works.
if (resizeToFit && view.getPath('layout.width') !== position) {
view.adjust('width', position);
}
View
2 frameworks/core_foundation/child_view_layouts/vertical_stack_layout.js
@@ -275,12 +275,12 @@ SC.mixin(SC.View,
marginAfter = lastMargin || spacing;
}
- // Adjust our frame to fit as well, this ensures that scrolling works.
// If the current size is 0 (all children are hidden), it doesn't make sense to add the padding
if (position !== 0) {
position += Math.max(lastMargin, paddingAfter);
}
+ // Adjust our frame to fit as well, this ensures that scrolling works.
if (resizeToFit && view.getPath('layout.height') !== position) {
view.adjust('height', position);
}
View
19 frameworks/datastore/system/child_array.js
@@ -165,18 +165,21 @@ SC.ChildArray = SC.Object.extend(SC.Enumerable, SC.Array,
var children = this.get('editableChildren'),
len = recs ? (recs.get ? recs.get('length') : recs.length) : 0,
record = this.get('record'), newRecs,
-
pname = this.get('propertyName'),
cr, recordType;
-
+
newRecs = this._processRecordsToHashes(recs);
+
// notify that the record did change...
if (newRecs !== this._prevChildren){
this._performRecordPropertyChange(null, false);
- }
+ }
children.replace(idx, amt, newRecs);
record.recordDidChange(pname);
+ // Update the enumerable, [], property (including firstObject and lastObject)
+ this.enumerableContentDidChange(idx, amt, len - amt);
+
return this;
},
@@ -224,12 +227,12 @@ SC.ChildArray = SC.Object.extend(SC.Enumerable, SC.Array,
this._performRecordPropertyChange(keys, true);
return this;
},
-
+
/** @private
Invoked when the object is changed from the parent or an outside source
-
+
will cause the entire array to reset
-
+
@param {SC.Array} keys optional
@param {Boolean} doReset optional
@returns {SC.ChildArray} itself.
@@ -263,10 +266,10 @@ SC.ChildArray = SC.Object.extend(SC.Enumerable, SC.Array,
newLen = children.get('length');
}
this._prevChildren = children;
-
+
if (doReset){
this.arrayContentWillChange(0, oldLen, newLen);
- this._childrenContentDidChange(0, oldLen, newLen);
+ this._childrenContentDidChange(0, oldLen, newLen);
}
return this;
View
1 frameworks/datastore/system/many_array.js
@@ -337,6 +337,7 @@ SC.ManyArray = SC.Object.extend(SC.Enumerable, SC.Array,
record.recordDidChange(pname);
}
+ // Update the enumerable, [], property (including firstObject and lastObject)
this.enumerableContentDidChange(idx, amt, len - amt);
return this;

0 comments on commit 7040df4

Please sign in to comment.
Something went wrong with that request. Please try again.