Change some things around

This commit is contained in:
Zixaphir 2014-04-04 17:05:53 -07:00
parent 11b699a0b6
commit f6898b8c03
6 changed files with 26 additions and 51 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -366,7 +366,7 @@ UI = do ->
hoverend = (e) -> hoverend = (e) ->
return if e.type is 'keydown' and e.keyCode isnt 13 or e.target.nodeName is "TEXTAREA" return if e.type is 'keydown' and e.keyCode isnt 13 or e.target.nodeName is "TEXTAREA"
$.rm @el if @el.parentNode is Header.hover $.rm @el
$.off @root, @endEvents, @hoverend $.off @root, @endEvents, @hoverend
$.off d, 'keydown', @hoverend $.off d, 'keydown', @hoverend
$.off @root, 'mousemove', @hover $.off @root, 'mousemove', @hover

View File

@ -1193,10 +1193,12 @@ nav a,
opacity: .5; opacity: .5;
} }
.expanded-image > .post > .file > .fileThumb > img[data-md5], .expanded-image > .post > .file > .fileThumb > img[data-md5],
.post > .file > .fileThumb > .full-image { .post > .file > .fileThumb > .full-image,
.post > .file > .full-image {
display: none; display: none;
} }
.expanded-image > .post > .file > .fileThumb > .full-image { .expanded-image > .post > .file > .fileThumb > .full-image,
.expanded-image > .post > .file > .full-image {
display: block; display: block;
} }
.thread > .replyContainer:last-of-type .post { .thread > .replyContainer:last-of-type .post {

View File

@ -105,7 +105,6 @@ ImageExpand =
naturalHeight = if isVideo then 'videoHeight' else 'naturalHeight' naturalHeight = if isVideo then 'videoHeight' else 'naturalHeight'
if img = post.file.fullImage if img = post.file.fullImage
# Expand already-loaded/ing picture. # Expand already-loaded/ing picture.
$.rmClass img, 'ihover'
$.addClass img, 'full-image' $.addClass img, 'full-image'
img.controls = (img.parentNode isnt thumb.parentNode) img.controls = (img.parentNode isnt thumb.parentNode)
$.asap (-> img[naturalHeight]), -> $.asap (-> img[naturalHeight]), ->

View File

@ -20,17 +20,11 @@ ImageHover =
else else
Get.postFromNode @ Get.postFromNode @
{isVideo} = post.file {isVideo} = post.file
if post.file.fullImage el = $.el (if isVideo then 'video' else 'img'),
el = post.file.fullImage className: 'ihover'
$.rmClass el, 'full-image' src: post.file.URL
$.addClass el, 'ihover' {thumb} = post.file
else $.add Header.hover, el
el = $.el (if isVideo then 'video' else 'img'),
className: 'ihover'
src: post.file.URL
post.file.fullImage = el
{thumb} = post.file
$.after (if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb), el
el.dataset.fullID = post.fullID el.dataset.fullID = post.fullID
if isVideo if isVideo
el.loop = true el.loop = true