Revert "Handle addition/removal of ‘gutter-hidden’ attribute"

This reverts commit 6926236268.

There seems to be some bug or timing issue that prevents the
attachedCallback from being called in all cases when the
attributeChangedCallback is defined. We can figure this out at
a later time.
Esse commit está contido em:
Nathan Sobo
2015-01-12 17:39:07 -07:00
commit dd80226c23
2 arquivos alterados com 0 adições e 15 exclusões
-11
Ver Arquivo
@@ -30,17 +30,6 @@ describe "TextEditorElement", ->
element = jasmineContent.firstChild
expect(element.getModel().getText()).toBe 'testing'
describe "when attributes change", ->
it "honors addition/removal of the 'gutter-hidden' attribute", ->
element = new TextEditorElement
expect(element.getModel().isGutterVisible()).toBe true
element.setAttributeNode(document.createAttribute("gutter-hidden"))
expect(element.getModel().isGutterVisible()).toBe false
element.removeAttribute('gutter-hidden')
expect(element.getModel().isGutterVisible()).toBe true
describe "when the model is assigned", ->
it "adds the 'mini' attribute if .isMini() returns true on the model", ->
element = new TextEditorElement
-4
Ver Arquivo
@@ -71,10 +71,6 @@ class TextEditorElement extends HTMLElement
@unmountComponent()
@emitter.emit("did-detach")
attributeChangedCallback: (name, oldValue, newValue) ->
if name is 'gutter-hidden'
@getModel().setGutterVisible(not @hasAttribute('gutter-hidden'))
initialize: (model) ->
@setModel(model)
this