 
   doesntIntersectWith = (p1, q1) -> ({p, q}) -> not lines.intersects p1, q1, p, q
 
-  Directives.directive 'currentStep', Array '$window', ($window) ->
+  # Handle the seamless attribute on iframes.
+  Directives.directive 'isSeamless', ->
+    restrict: 'A'
+    scope:
+      isSeamless: '='
+    link: (scope, element, attrs) ->
+      scope.$watch 'isSeamless', (seamless) ->
+        if seamless
+          element.attr 'seamless', 'seamless'
+        else
+          element.removeAttr('seamless')
+
+  Directives.directive 'currentStep', Array '$window', 'stepConfig', ($window, conf) ->
     restrict: 'C'
     scope:
       tool: '=tool'

      tool: '=tool'
    link: (scope, element, attrs) ->

      ctrl = "#{$window.location}/#{scope.tool.controllerURI}"
      tmpl = "#{$window.location}/#{scope.tool.templateURI}"

      require [ctrl, "text!#{ tmpl }"], (controller, template) ->

        $injector.invoke controller, this, {'$scope': scope}

        element.html(template)
        $compile(element.contents())(scope)

        scope.$apply()



        {{tool.heading}}
      </div>
      <div class="panel-body">
        <iframe is-seamless="tool.seamless" src="{{tool.src}}" width="100%">
      </div>
    """
    link: (scope, element, attrs) ->
