Skip to content

Commit

Permalink
Change when the new Alchemy instance is pushed to the list of instanc…
Browse files Browse the repository at this point in the history
…es. …

The previous push location was too late for code that depended on the length of Alchemy instances.

See discussion: GraphAlchemist#543

Fixes GraphAlchemist#543
  • Loading branch information
Kyle Roberts committed Jun 23, 2015
1 parent c71ddb9 commit 8f107bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/scripts/alchemy/Alchemy.coffee.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ title: Anotated Source
begin: (userConf) ->
# overide configuration with user inputs
conf = @setConf userConf
Alchemy::instances.push @
switch typeof @conf.dataSource
when 'string' then d3.json @a.conf.dataSource, @a.startGraph
when 'object' then @a.startGraph @a.conf.dataSource
@plugins.init()
Alchemy::instances.push @
@
Expand Down
3 changes: 2 additions & 1 deletion test/spec/uiTests.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ do ->
it "should present to the browser all info necessary to render data", ->
d3.select('g.node').text().should.equal "AlchemyJS"
d3.select('g.edge').text().should.equal "Maintains"
alchemy.vis.attr('alchInst').should.equal "0"

return
return

0 comments on commit 8f107bf

Please sign in to comment.