From 8a0d2e766322bc9556764e9df869db6d4d6b3fb3 Mon Sep 17 00:00:00 2001 From: Dan Motzenbecker Date: Tue, 10 Sep 2013 23:12:09 -0400 Subject: [PATCH] no need to reset modified styles --- oridomi.coffee | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/oridomi.coffee b/oridomi.coffee index 379beb5..f61b5f9 100644 --- a/oridomi.coffee +++ b/oridomi.coffee @@ -324,10 +324,6 @@ class OriDomi # Return if the element doesn't exist. unless @el and @el.nodeType is 1 console.warn 'oriDomi: First argument must be a DOM element' if devMode - # Record the current global styling of the target element. - elStyle = window.getComputedStyle @el - @_originalStyle = {} - @_originalStyle[key] = elStyle[key] for key in modifiedStyleKeys return # Extend any passed options with the defaults map. @@ -959,7 +955,7 @@ class OriDomi # Remove the oriDomi element from the DOM. @el.innerHTML = @cleanEl.innerHTML # Reset original styles. - @el.style[key] = val for key, val of @_originalStyle + @el.classList.remove elClasses.active callback?() null