diff --git a/ui/gallery-prototype.js b/ui/gallery-prototype.js
index 76f9a1e6..eb03b50a 100755
--- a/ui/gallery-prototype.js
+++ b/ui/gallery-prototype.js
@@ -738,6 +738,18 @@ function getCurrentHorizontalOffset(image){
+// XXX some minor inacuracies...
+function centerIndicator(){
+ // XXX something odd going on with the border here...
+ var i_border = Math.abs($('.current-indicator').outerHeight() - $('.current-indicator').height())/2
+ $('.current-indicator').css({
+ 'top': ($('.ribbon').index($('.current.ribbon'))) * $('.ribbon').outerHeight() - i_border,
+ 'left': ($('.viewer').outerWidth() - $('.current-indicator').outerWidth())/2,
+ })
+}
+
+
+
function centerSquare(){
$('.field').css({
'margin-top': getCurrentVerticalOffset()
@@ -973,7 +985,7 @@ function loadJSON(data, set_order){
var field = $('.field')
// drop all old content...
- field.children().remove()
+ field.children('.ribbon').remove()
for(var i=0; i < ribbons.length; i++){
var images = ribbons[i]
@@ -1005,6 +1017,7 @@ function handleImageClick(){
.addClass('current')
// position the field and ribbons...
centerSquare()
+ centerIndicator()
alignRibbons()
}
@@ -1297,6 +1310,21 @@ ImageGrid.GROUP('Mode: Ribbon',
type: 'toggle',
},
createCSSClassToggler('.viewer', 'single-ribbon-mode')),
+ ImageGrid.ACTION({
+ id: 'toggleCurrentRibbonOpacity',
+ title: 'Current ribbon opacity',
+ doc: 'Toggle other image transparancy/opacity in current ribbon.',
+ type: 'toggle',
+ },
+ createCSSClassToggler('.viewer', 'opaque-current-ribbon')),
+ ImageGrid.ACTION({
+ id: 'toggleIndicatorDot',
+ title: 'Dot indicator',
+ doc: 'Toggle indicator between dot and frame modes.\n\n'+
+ 'NOTE: this is visible only when the indicator is visible.',
+ type: 'toggle',
+ },
+ createCSSClassToggler('.viewer', 'dot-indicator')),
// XXX this can be done in two ways:
// - keep all images when promoting, just add a class to them that
diff --git a/ui/gallery.css b/ui/gallery.css
index 3674d3a0..535c97d7 100755
--- a/ui/gallery.css
+++ b/ui/gallery.css
@@ -102,11 +102,13 @@
}
-.image {
- float: left;
-
+.image, .current-indicator {
width: 350px;
height: 350px;
+}
+
+.image {
+ float: left;
background: no-repeat 50% black;
background-size: contain;
@@ -116,6 +118,45 @@
cursor: hand;
}
+.current-indicator {
+ display: none;
+}
+
+
+.opaque-current-ribbon .current-indicator {
+ display: block;
+ position: absolute;
+}
+.opaque-current-ribbon .current-indicator div {
+ position: relative;
+ border: solid gray 4px;
+
+ margin-top: -2px;
+ margin-left: -4px;
+
+ width: 100%;
+ height: 100%;
+}
+
+.opaque-current-ribbon.dot-indicator .current-indicator {
+ display: block;
+ position: absolute;
+}
+.opaque-current-ribbon.dot-indicator .current-indicator div {
+ position: absolute;
+ border: solid silver 5px;
+
+ bottom: 5px;
+ right: 5px;
+
+ width: 5px;
+ height: 5px;
+}
+
+.opaque-current-ribbon .current.ribbon .image {
+ opacity: 1.0;
+}
+
.mock-image {
background: blue;
diff --git a/ui/gallery.html b/ui/gallery.html
index 2d4e4e27..f9bd28dc 100755
--- a/ui/gallery.html
+++ b/ui/gallery.html
@@ -110,6 +110,9 @@ $(document).ready(setup);