Fixes the default rotationInterval Mustella test.
diff --git a/frameworks/projects/mobiletheme/defaults.css b/frameworks/projects/mobiletheme/defaults.css
index 6e0edee..b6f425e 100644
--- a/frameworks/projects/mobiletheme/defaults.css
+++ b/frameworks/projects/mobiletheme/defaults.css
@@ -102,6 +102,7 @@
BusyIndicator
{
skinClass: ClassReference("spark.skins.mobile.BusyIndicatorSkin");
+ rotationInterval: 50;
}
Button
diff --git a/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as b/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as
index 194e222..4d553ba 100644
--- a/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as
+++ b/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as
@@ -239,6 +239,12 @@
return diameter;
}
+ override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ measuredHeight = unscaledHeight;
+ measuredWidth = unscaledWidth;
+ }
+
/**
* @private
*
diff --git a/frameworks/projects/spark/src/spark/components/BusyIndicator.as b/frameworks/projects/spark/src/spark/components/BusyIndicator.as
index a78ac8e..f9893d8 100644
--- a/frameworks/projects/spark/src/spark/components/BusyIndicator.as
+++ b/frameworks/projects/spark/src/spark/components/BusyIndicator.as
@@ -21,6 +21,7 @@
{
import flash.events.Event;
+ import mx.core.DesignLayer;
import mx.core.IUIComponent;
import mx.core.IVisualElement;
import mx.core.mx_internal;
@@ -146,7 +147,7 @@
new State({name:"notRotatingState"}),
new State({name:"rotatingState"})
];
- //mx_internal::skinDestructionPolicy = "auto";
+ mx_internal::skinDestructionPolicy = "auto";
}
override protected function commitProperties():void
@@ -192,6 +193,14 @@
invalidateProperties();
}
+ override public function set designLayer(value:DesignLayer):void
+ {
+ super.designLayer = value;
+
+ effectiveVisibilityChanged = true;
+ invalidateProperties();
+ }
+
private function addedToStageHandler(event:Event):void
{
// Check our visibility here since we haven't added
@@ -201,8 +210,8 @@
if (canRotate())
currentState = "rotatingState";
- invalidateSkinState();
addVisibilityListeners();
+ invalidateSkinState();
}
private function removedFromStageHandler(event:Event):void
@@ -212,7 +221,6 @@
removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
removeEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);
removeVisibilityListeners();
- detachSkin();
invalidateSkinState();
}