minor fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-05-22 01:57:46 +03:00
parent 672bd773a6
commit 57ca7f769b

View File

@ -491,7 +491,7 @@ object.Constructor('igImageGraph', HTMLElement, {
// load button state... // load button state...
var _update = function(){ var _update = function(){
Object.assign(button.style, Object.assign(button.style,
!that.__rotated ? that.__rotated == null ?
{ {
transform: '', transform: '',
marginTop: '-2px', marginTop: '-2px',
@ -502,16 +502,20 @@ object.Constructor('igImageGraph', HTMLElement, {
}) } }) }
_update() _update()
button.disabled = that.graph != 'waveform' button.disabled = that.graph != 'waveform'
// do the rotation...
button.onclick = function(){ button.onclick = function(){
var n = that.orientation = var o = that.__rotated
that.orientation == 0 ? var c = that.orientation*1
90
: that.orientation == 180 ? that.orientation = o == null ?
270 // rotate...
: that.orientation == 270 ? (c + 90) % 360
180 // restore...
: 0 : o
var r = that.__rotated = !that.__rotated
that.__rotated = o == null ?
c
: null
_update() _update()
} }
return button }(), return button }(),