File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ class Drawable {
123
123
this . _transformedHullDirty = true ;
124
124
125
125
this . _skinWasAltered = this . _skinWasAltered . bind ( this ) ;
126
+ this . _silhouetteWasUpdated = this . _silhouetteWasUpdated . bind ( this ) ;
126
127
127
128
this . isTouching = this . _isTouchingNever ;
128
129
}
@@ -166,10 +167,12 @@ class Drawable {
166
167
if ( this . _skin !== newSkin ) {
167
168
if ( this . _skin ) {
168
169
this . _skin . removeListener ( Skin . Events . WasAltered , this . _skinWasAltered ) ;
170
+ this . _skin . removeListener ( Skin . Events . SilhouetteUpdated , this . _silhouetteWasUpdated ) ;
169
171
}
170
172
this . _skin = newSkin ;
171
173
if ( this . _skin ) {
172
174
this . _skin . addListener ( Skin . Events . WasAltered , this . _skinWasAltered ) ;
175
+ this . _skin . addListener ( Skin . Events . SilhouetteUpdated , this . _silhouetteWasUpdated ) ;
173
176
}
174
177
this . _skinWasAltered ( ) ;
175
178
}
@@ -730,6 +733,14 @@ class Drawable {
730
733
this . setTransformDirty ( ) ;
731
734
}
732
735
736
+ /**
737
+ * Respond to an internal change in the current Skin's silhouette.
738
+ * @private
739
+ */
740
+ _silhouetteWasUpdated ( ) {
741
+ this . setConvexHullDirty ( ) ;
742
+ }
743
+
733
744
/**
734
745
* Calculate a color to represent the given ID number. At least one component of
735
746
* the resulting color will be non-zero if the ID is not RenderConstants.ID_NONE.
You can’t perform that action at this time.
0 commit comments