Skip to content

Commit

Permalink
can enter child scope in debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
nickretallack committed Jun 24, 2013
1 parent 866edbe commit 681e2e7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions graph.coffee
Expand Up @@ -75,6 +75,11 @@ module.directive 'graph', ($location) ->
$scope.edit_node = (node) ->
$location.path "/#{node.implementation.id}"

# update debugger
new_debugger_scope = $scope.$root.debugger_scope?.nodes[node.id]
if new_debugger_scope?
$scope.$root.debugger_scope = new_debugger_scope

$scope.can_bust_selected_node = ->
$scope.selection.length is 1 and $scope.selection[0].implementation instanceof interpreter.Graph
$scope.bust_selected_node = ->
Expand Down
7 changes: 6 additions & 1 deletion graph.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions stuff.coffee
Expand Up @@ -175,6 +175,7 @@ module.controller 'subroutine', ($scope, $routeParams, interpreter, $q) ->

module.controller 'debugger', ($scope, $location) ->
$scope.debug = ->
$scope.$root.debugger_scope = $scope.$root.runtime.scope
$scope.$root.runtime.cleanup()
$scope.$root.debug_step = 0
$scope.$root.debugger = true
Expand Down
1 change: 1 addition & 0 deletions stuff.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion subroutine.html
Expand Up @@ -61,7 +61,7 @@

<div ng-switch-default>
<ul class="unstyled"><li ng-repeat="source in node.get_node_sources()" class="source">
<div class="value">{{runtime.scope.nodes[node.id].output_values[source.id]}}</div>
<div class="value">{{debugger_scope.nodes[node.id].output_values[source.id]}}</div>
<div nib="source" node="node"></div>
{{source.text}}
</li></ul>
Expand Down

0 comments on commit 681e2e7

Please sign in to comment.