Last active
August 29, 2015 14:18
-
-
Save seanh/27923cd813425de2a8e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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