mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40:08 +00:00
more tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7abd1b0f4e
commit
aab21de923
@ -19,7 +19,14 @@ input[type=radio] {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
input:not(:checked) ~ * {
|
input:not(:checked) ~ * {
|
||||||
color: silver;
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
input:hover:not(:checked) ~ * {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
input:not(:checked) ~ sub:hover,
|
||||||
|
input:not(:checked) ~ sub {
|
||||||
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.material-icons {
|
.material-icons {
|
||||||
@ -119,7 +126,6 @@ function setRatio(ratio){
|
|||||||
.data('uiResizable')._aspectRatio = ratio
|
.data('uiResizable')._aspectRatio = ratio
|
||||||
|
|
||||||
if(ratio === false){
|
if(ratio === false){
|
||||||
$('#lock-ratio')[0].checked = false
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,17 +159,19 @@ function flip(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleLock(){
|
function toggleLock(m){
|
||||||
var crop = $('.crop')
|
var crop = $('.crop')
|
||||||
var r = crop.resizable("option", "aspectRatio")
|
var r = crop.resizable("option", "aspectRatio")
|
||||||
|
|
||||||
if(r === false){
|
if(m === true || r === false){
|
||||||
var w = crop.width()
|
var w = crop.width()
|
||||||
var h = crop.height()
|
var h = crop.height()
|
||||||
|
|
||||||
|
$('#lock-ratio')[0].checked = true
|
||||||
setRatio(w/h)
|
setRatio(w/h)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
$('#lock-ratio')[0].checked = false
|
||||||
setRatio(false)
|
setRatio(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -203,6 +211,7 @@ function toggleLock(){
|
|||||||
<span>16:9</span>
|
<span>16:9</span>
|
||||||
</label>
|
</label>
|
||||||
<button onclick="flip()"><span class="material-icons">crop_rotate</span></button>
|
<button onclick="flip()"><span class="material-icons">crop_rotate</span></button>
|
||||||
|
<button><span class="material-icons">clear</span></button>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<pre>
|
<pre>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user