mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 19:08:50 +00:00
Fix subtracting theme states
This commit is contained in:
1 parent
5309cc5916
commit
bad731c86f
1 file changed
+3
-3
+3
-3
@@ -425,17 +425,17 @@ CPThemeState.subtractThemeStates = function(aState1, aState2)
|
||||
if (aState2 === undefined || aState2 === nil || aState2 === [CPNull null])
|
||||
return aState1;
|
||||
|
||||
var newThemeState = new ThemeState({});
|
||||
var newStates = {};
|
||||
for (var stateName in aState1._stateNames)
|
||||
{
|
||||
if (!aState1._stateNames.hasOwnProperty(stateName))
|
||||
continue;
|
||||
|
||||
if (!aState2._stateNames[stateName])
|
||||
newThemeState[stateName] = true;
|
||||
newStates[stateName] = true;
|
||||
}
|
||||
|
||||
return CPThemeState._cacheThemeState(newThemeState);
|
||||
return CPThemeState._cacheThemeState(new ThemeState(newStates));
|
||||
}
|
||||
|
||||
CPThemeState._cacheThemeState = function(aState)
|
||||
|
||||
Reference in new issue
Block a user