mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
minor fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
672bd773a6
commit
57ca7f769b
@ -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 }(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user