From 8a006ae223a0fec446eabd6f4a06a4d843e24446 Mon Sep 17 00:00:00 2001 From: Anthony Truskinger Date: Sun, 1 Dec 2013 05:12:53 +1000 Subject: [PATCH] Tweaked some visual styles for box rendering (Fixes #4) - Turned on Z-indexing for selected boxes. - Improved hover behaviour / SELECTED behaviour so that tag preview link line shows more consistently - Added a hovering state to the model - Got the tag preview to hide its border (underline) and ensured it only showed when linked annotation was hovered over / selected --- .../annotationViewer/_annotation_viewer.scss | 18 +++++++++++++++++- .../annotationViewer/annotationViewer.tpl.html | 1 + src/common/jquery.drawabox.js | 15 ++++++++++++++- .../directives/bawAnnotationViewer.js | 8 +++++--- src/components/models/annotation.js | 1 + 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/app/annotationViewer/_annotation_viewer.scss b/src/app/annotationViewer/_annotation_viewer.scss index b792fa77..61acadda 100644 --- a/src/app/annotationViewer/_annotation_viewer.scss +++ b/src/app/annotationViewer/_annotation_viewer.scss @@ -33,20 +33,30 @@ baw-annotation-viewer { line-height: $standard-line-height; li { - border-bottom: $tagAlignmentLine solid 1px; + margin-left: -4px; position: absolute; bottom: -1px; padding-left: 2px; + z-index: 0; + background-color: transparent; @include vendor-prefix(transform-origin, 0 0); @include vendor-prefix(transform, rotate3d(0,0,1,-20deg)); + + } } } + & .active { + z-index: 100; + background-color: #ffffff; + border-bottom: $tagAlignmentLine solid 1px; + } + & #scroller{ overflow-x: scroll; @@ -109,6 +119,7 @@ baw-annotation-viewer { position: absolute; background-color: rgba(255,255,255,0.05); overflow: visible; + z-index: 0; &:before { @if not $DEBUG { @@ -128,10 +139,15 @@ baw-annotation-viewer { &[data-selected="true"] { border-color: $marqueeBorderColorSelected; @include glow($marqueeBorderColorSelectedGlow); + z-index: 100; & .close-icon{ visibility: visible; } + + &:before { + visibility: visible; + } } &:hover { diff --git a/src/app/annotationViewer/annotationViewer.tpl.html b/src/app/annotationViewer/annotationViewer.tpl.html index a8a9feda..1b13d55f 100644 --- a/src/app/annotationViewer/annotationViewer.tpl.html +++ b/src/app/annotationViewer/annotationViewer.tpl.html @@ -5,6 +5,7 @@