Skip to content

Commit

Permalink
no need to reset modified styles
Browse files Browse the repository at this point in the history
  • Loading branch information
dmotz committed Sep 11, 2013
1 parent e5f5c77 commit 8a0d2e7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions oridomi.coffee
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 8a0d2e7

Please sign in to comment.