Permalink
Browse files

When detaching the behavior from an element, reset that element's bac…

…kground and border colors from transparent to the default
  • Loading branch information...
Jason Johnston
Jason Johnston committed Jun 20, 2010
1 parent 1a1b198 commit a6e60b7c7787e3382fc4eac3e73ced4bbcb775cd
Showing with 12 additions and 0 deletions.
  1. +6 −0 sources/BackgroundRenderer.js
  2. +6 −0 sources/BorderRenderer.js
@@ -368,6 +368,12 @@ PIE.BackgroundRenderer = PIE.RendererBase.newRenderer( {
var rs = this.element.runtimeStyle;
rs.backgroundImage = 'none';
rs.backgroundColor = 'transparent';
+ },
+
+ destroy: function() {
+ PIE.RendererBase.destroy.call( this );
+ var rs = this.element.runtimeStyle;
+ rs.backgroundImage = rs.backgroundColor = '';
}
} );
@@ -281,6 +281,12 @@ PIE.BorderRenderer = PIE.RendererBase.newRenderer( {
}
return segments;
+ },
+
+ destroy: function() {
+ PIE.RendererBase.destroy.call( this );
+ this.element.runtimeStyle.borderColor = '';
}
+
} );

0 comments on commit a6e60b7

Please sign in to comment.