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...
|
// XXX EXPERIMENTAL: graph...
|
||||||
'metadata-graph': true,
|
'metadata-graph': 'on',
|
||||||
'metadata-graph-config': {
|
'metadata-graph-config': {
|
||||||
graph: 'waveform',
|
graph: 'waveform',
|
||||||
mode: 'luminance',
|
mode: 'luminance',
|
||||||
@ -351,6 +351,10 @@ var MetadataUIActions = actions.Actions({
|
|||||||
core.makeConfigToggler('metadata-auto-select-mode',
|
core.makeConfigToggler('metadata-auto-select-mode',
|
||||||
function(){ return this.config['metadata-auto-select-modes'] })],
|
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(..)
|
// NOTE: this will extend the Browse object with .updateMetadata(..)
|
||||||
// method to enable updating of metadata in the list...
|
// method to enable updating of metadata in the list...
|
||||||
//
|
//
|
||||||
@ -409,7 +413,7 @@ var MetadataUIActions = actions.Actions({
|
|||||||
delete this.__graph_updating }.bind(this), 200)
|
delete this.__graph_updating }.bind(this), 200)
|
||||||
|
|
||||||
// graph disabled...
|
// graph disabled...
|
||||||
if(!graph || !that.config['metadata-graph']){
|
if(!graph || that.config['metadata-graph'] != 'on'){
|
||||||
return }
|
return }
|
||||||
|
|
||||||
// data...
|
// data...
|
||||||
@ -451,7 +455,7 @@ var MetadataUIActions = actions.Actions({
|
|||||||
// XXX EXPERIMENTAL: graph
|
// XXX EXPERIMENTAL: graph
|
||||||
// graph...
|
// graph...
|
||||||
graph
|
graph
|
||||||
&& that.config['metadata-graph']
|
&& that.config['metadata-graph'] == 'on'
|
||||||
&& make(['Graph:', $(this.updateGraph())],
|
&& make(['Graph:', $(this.updateGraph())],
|
||||||
{ cls: 'preview' })
|
{ cls: 'preview' })
|
||||||
// NOTE: these are 1-based and not 0-based...
|
// NOTE: these are 1-based and not 0-based...
|
||||||
|
|||||||
@ -488,10 +488,20 @@ object.Constructor('igImageGraph', HTMLElement, {
|
|||||||
button.setAttribute('id', 'orientation-button')
|
button.setAttribute('id', 'orientation-button')
|
||||||
button.classList.add('update')
|
button.classList.add('update')
|
||||||
button.innerHTML = '🡑'
|
button.innerHTML = '🡑'
|
||||||
button.style.marginTop = '-2px'
|
// load button state...
|
||||||
//button.innerHTML = '↕'
|
var _update = function(){
|
||||||
|
Object.assign(button.style,
|
||||||
|
!that.__rotated ?
|
||||||
|
{
|
||||||
|
transform: '',
|
||||||
|
marginTop: '-2px',
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
transform: 'rotate(90deg)',
|
||||||
|
marginTop: '-1px',
|
||||||
|
}) }
|
||||||
|
_update()
|
||||||
button.disabled = that.graph != 'waveform'
|
button.disabled = that.graph != 'waveform'
|
||||||
var o = that.orientation || 0
|
|
||||||
button.onclick = function(){
|
button.onclick = function(){
|
||||||
var n = that.orientation =
|
var n = that.orientation =
|
||||||
that.orientation == 0 ?
|
that.orientation == 0 ?
|
||||||
@ -501,9 +511,8 @@ object.Constructor('igImageGraph', HTMLElement, {
|
|||||||
: that.orientation == 270 ?
|
: that.orientation == 270 ?
|
||||||
180
|
180
|
||||||
: 0
|
: 0
|
||||||
// update button orientation...
|
var r = that.__rotated = !that.__rotated
|
||||||
this.style.transform = 'rotate('+(o == n ? 0 : 90)+'deg)'
|
_update()
|
||||||
this.style.marginTop = o == n ? '-2px' : '-1px'
|
|
||||||
}
|
}
|
||||||
return button }(),
|
return button }(),
|
||||||
// modes...
|
// modes...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user