Skip to content

Instantly share code, notes, and snippets.

@seanh
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanh/27923cd813425de2a8e7 to your computer and use it in GitHub Desktop.
Save seanh/27923cd813425de2a8e7 to your computer and use it in GitHub Desktop.
diff --git a/h/static/scripts/app.coffee b/h/static/scripts/app.coffee
index 62cccba..5c98e67 100644
--- a/h/static/scripts/app.coffee
+++ b/h/static/scripts/app.coffee
@@ -112,6 +112,7 @@ module.exports = angular.module('h', [
.directive('match', require('./directive/match'))
.directive('tabbable', require('./directive/tabbable'))
.directive('tabReveal', require('./directive/tab-reveal'))
+.directive('scrollToMe', require('./directive/scrolltome'))
.filter('converter', require('./filter/converter'))
.filter('moment', require('./filter/moment'))
diff --git a/h/templates/client/annotation.html b/h/templates/client/annotation.html
index d489636..c703c75 100644
--- a/h/templates/client/annotation.html
+++ b/h/templates/client/annotation.html
@@ -1,4 +1,4 @@
-<header class="annotation-header">
+<header class="annotation-header" id="{{vm.editing ? 'scrollToMe' : '' }}" scrollToMe="yes">
<!-- Deletion notice -->
<span ng-if="!vm.editing && vm.annotation.deleted">Annotation deleted.</span>
module.exports = ['$location', '$anchorScroll', ($location, $anchorScroll) ->
$location.hash('scrollToMe')
$anchorScroll()
debugger
return (
restrict: 'A'
)
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment