@ -130,8 +130,7 @@ export function initImageDiff() {
initOverlay ( createContext ( $imageAfter [ 2 ] , $imageBefore [ 2 ] ) ) ;
initOverlay ( createContext ( $imageAfter [ 2 ] , $imageBefore [ 2 ] ) ) ;
}
}
$container . find ( '> .gt-hidden' ) . removeClass ( 'gt-hidden' ) ;
$container . find ( '> .image-diff-tabs' ) . removeClass ( 'is-loading' ) ;
hideElem ( $container . find ( '.ui.loader' ) ) ;
}
}
function initSideBySide ( sizes ) {
function initSideBySide ( sizes ) {
@ -205,7 +204,7 @@ export function initImageDiff() {
} ) ;
} ) ;
$container . find ( '.diff-swipe' ) . css ( {
$container . find ( '.diff-swipe' ) . css ( {
width : sizes . max . width * factor + 2 ,
width : sizes . max . width * factor + 2 ,
height : sizes . max . height * factor + 4
height : sizes . max . height * factor + 30 /* extra height for inner "position: absolute" elements */ ,
} ) ;
} ) ;
$container . find ( '.swipe-bar' ) . on ( 'mousedown' , function ( e ) {
$container . find ( '.swipe-bar' ) . on ( 'mousedown' , function ( e ) {
e . preventDefault ( ) ;
e . preventDefault ( ) ;
@ -261,7 +260,7 @@ export function initImageDiff() {
// the "css(width, height)" is somewhat hacky and not easy to understand, it could be improved in the future
// the "css(width, height)" is somewhat hacky and not easy to understand, it could be improved in the future
sizes . image2 . parent ( ) . parent ( ) . css ( {
sizes . image2 . parent ( ) . parent ( ) . css ( {
width : sizes . max . width * factor + 2 ,
width : sizes . max . width * factor + 2 ,
height : sizes . max . height * factor + 2 + 20 /* extra height for inner "position: absolute" elements */ ,
height : sizes . max . height * factor + 2 ,
} ) ;
} ) ;
const $range = $container . find ( "input[type='range']" ) ;
const $range = $container . find ( "input[type='range']" ) ;