mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
settings and minor tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1427a327eb
commit
8149fcf41a
@ -340,7 +340,7 @@ var MetadataUIActions = actions.Actions({
|
||||
],
|
||||
|
||||
// XXX EXPERIMENTAL: graph...
|
||||
'metadata-graph': true,
|
||||
'metadata-graph': 'on',
|
||||
'metadata-graph-config': {
|
||||
graph: 'waveform',
|
||||
mode: 'luminance',
|
||||
@ -351,6 +351,10 @@ var MetadataUIActions = actions.Actions({
|
||||
core.makeConfigToggler('metadata-auto-select-mode',
|
||||
function(){ return this.config['metadata-auto-select-modes'] })],
|
||||
|
||||
toggleMetadataGraph: ['Interface/Metadata graph display',
|
||||
{ browseMode: function(){ return !graph && 'hidden' }, },
|
||||
core.makeConfigToggler('metadata-graph', ['on', 'off'])],
|
||||
|
||||
// NOTE: this will extend the Browse object with .updateMetadata(..)
|
||||
// method to enable updating of metadata in the list...
|
||||
//
|
||||
@ -409,7 +413,7 @@ var MetadataUIActions = actions.Actions({
|
||||
delete this.__graph_updating }.bind(this), 200)
|
||||
|
||||
// graph disabled...
|
||||
if(!graph || !that.config['metadata-graph']){
|
||||
if(!graph || that.config['metadata-graph'] != 'on'){
|
||||
return }
|
||||
|
||||
// data...
|
||||
@ -451,7 +455,7 @@ var MetadataUIActions = actions.Actions({
|
||||
// XXX EXPERIMENTAL: graph
|
||||
// graph...
|
||||
graph
|
||||
&& that.config['metadata-graph']
|
||||
&& that.config['metadata-graph'] == 'on'
|
||||
&& make(['Graph:', $(this.updateGraph())],
|
||||
{ cls: 'preview' })
|
||||
// NOTE: these are 1-based and not 0-based...
|
||||
|
||||
@ -488,10 +488,20 @@ object.Constructor('igImageGraph', HTMLElement, {
|
||||
button.setAttribute('id', 'orientation-button')
|
||||
button.classList.add('update')
|
||||
button.innerHTML = '🡑'
|
||||
button.style.marginTop = '-2px'
|
||||
//button.innerHTML = '↕'
|
||||
// load button state...
|
||||
var _update = function(){
|
||||
Object.assign(button.style,
|
||||
!that.__rotated ?
|
||||
{
|
||||
transform: '',
|
||||
marginTop: '-2px',
|
||||
}
|
||||
: {
|
||||
transform: 'rotate(90deg)',
|
||||
marginTop: '-1px',
|
||||
}) }
|
||||
_update()
|
||||
button.disabled = that.graph != 'waveform'
|
||||
var o = that.orientation || 0
|
||||
button.onclick = function(){
|
||||
var n = that.orientation =
|
||||
that.orientation == 0 ?
|
||||
@ -501,9 +511,8 @@ object.Constructor('igImageGraph', HTMLElement, {
|
||||
: that.orientation == 270 ?
|
||||
180
|
||||
: 0
|
||||
// update button orientation...
|
||||
this.style.transform = 'rotate('+(o == n ? 0 : 90)+'deg)'
|
||||
this.style.marginTop = o == n ? '-2px' : '-1px'
|
||||
var r = that.__rotated = !that.__rotated
|
||||
_update()
|
||||
}
|
||||
return button }(),
|
||||
// modes...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user