this should get width fitting working again
hopefully it doesn't break anything else
This commit is contained in:
parent
0f38b9c467
commit
98514dd986
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -719,7 +719,7 @@ span.hide-announcement {
|
||||
.full-image:not(#ihover) {
|
||||
display: none;
|
||||
}
|
||||
.expanded-image > .post > .file .full-image:not(#ihover) {
|
||||
.expanded-image > .post > .file > .fileThumb > .full-image:not(#ihover) {
|
||||
display: inline;
|
||||
}
|
||||
.expanding {
|
||||
@ -731,7 +731,7 @@ span.hide-announcement {
|
||||
:root.fit-width .full-image:not(#ihover) {
|
||||
max-width: 100%;
|
||||
}
|
||||
:root.gecko.fit-width .full-image {
|
||||
:root.gecko.fit-width .full-image:not(#ihover) {
|
||||
width: 100%;
|
||||
}
|
||||
#ihover {
|
||||
|
||||
@ -28,8 +28,10 @@ ImageExpand =
|
||||
cb:
|
||||
toggle: (e) ->
|
||||
return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||
post = Get.postFromNode @
|
||||
return if post.file.isExpanded and post.file.fullImage?.controls
|
||||
e.preventDefault()
|
||||
ImageExpand.toggle Get.postFromNode @
|
||||
ImageExpand.toggle post
|
||||
|
||||
toggleAll: ->
|
||||
$.event 'CloseMenu'
|
||||
@ -92,9 +94,11 @@ ImageExpand =
|
||||
contract: (post) ->
|
||||
if post.file.isVideo and video = post.file.fullImage
|
||||
video.pause()
|
||||
TrashQueue.add video, post
|
||||
post.file.thumb.parentNode.href = video.src
|
||||
post.file.thumb.parentNode.target = '_blank'
|
||||
for eventName, cb of ImageExpand.videoCB
|
||||
$.off video, eventName, cb
|
||||
TrashQueue.add video, post
|
||||
post.file.videoControls?.map($.rm)
|
||||
delete post.file.videoControls
|
||||
$.rmClass post.nodes.root, 'expanded-image'
|
||||
@ -115,8 +119,7 @@ ImageExpand =
|
||||
el.loop = true if isVideo
|
||||
$.on el, 'error', ImageExpand.error
|
||||
el.src = src or post.file.URL
|
||||
position = if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb
|
||||
$.after position, el unless el is position.nextSibling
|
||||
$.after thumb, el unless el is thumb.nextSibling
|
||||
$.asap (-> if isVideo then el.videoHeight else el.naturalHeight), ->
|
||||
ImageExpand.completeExpand post
|
||||
|
||||
@ -150,6 +153,8 @@ ImageExpand =
|
||||
{file} = post
|
||||
video = file.fullImage
|
||||
file.videoControls = []
|
||||
file.thumb.parentNode.removeAttribute 'href'
|
||||
file.thumb.parentNode.removeAttribute 'target'
|
||||
video.muted = !Conf['Allow Sound']
|
||||
video.controls = Conf['Show Controls']
|
||||
if Conf['Show Controls']
|
||||
|
||||
@ -21,8 +21,7 @@ ImageHover =
|
||||
post.file.fullImage = el
|
||||
{thumb} = post.file
|
||||
if d.body.contains thumb
|
||||
position = if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb
|
||||
$.after position, el unless el is position.nextSibling
|
||||
$.after thumb, el unless el is thumb.nextSibling
|
||||
else
|
||||
$.add Header.hover, el if el.parentNode isnt Header.hover
|
||||
el.id = 'ihover'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user