You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fs_hook.js 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. function resize_filmstrips(that,fn_name,args=[]){
  2. }
  3. function resize_filmstrips2(that,fn_name,args=[]){
  4. }
  5. glob_mx.filmstrip_handlers = glob_mx.filmstrip_handlers || {}
  6. glob_mx.filmstrip_tile_handlers = glob_mx.filmstrip_tile_handlers || {}
  7. function resizeThumbnailsForCustomView(that,fn_name,args=[]){
  8. const thumbs = glob_react.Filmstrip._getThumbs()
  9. const all_thumbs = $(".small_vid")
  10. const custom_thumbs = all_thumbs.not(thumbs.remlocThumbs)
  11. const vid_containers = $(".vid_container")
  12. const loose_thumbs = custom_thumbs.not(vid_containers.children())
  13. var k,v
  14. let fs_handler_key
  15. let fs_handler
  16. let fs_tile_handler
  17. let fs_handlers = new Map()
  18. let i
  19. // console.trace("rtscv...")
  20. let fs_tile_handlers = []
  21. for (v of vid_containers){
  22. // clog(":",v,v.dataset.fs_type)
  23. fs_handler_key = v.dataset.fs_handler
  24. // clog("~",v,v.dataset,fs_handler)
  25. fs_tile_handler = glob_mx.filmstrip_tile_handlers[fs_handler_key] || nop
  26. fs_handler = glob_mx.filmstrip_handlers[fs_handler_key] || nop
  27. // glob_mx.filmstrip_tile_handlers[fs_handler_key] ? glob_mx.filmstrip_tile_handlers[fs_handler_key](v) : 1
  28. // fs_tile_handlers.push([glob_mx.filmstrip_tile_handlers[fs_handler_key] || nop,v])
  29. // fs_handlers.setD(glob_mx.filmstrip_handlers[fs_handler_key] || nop,)
  30. fs_tile_handlers.push([fs_tile_handler,v])
  31. fs_handlers.setD(fs_handler,[])
  32. i = fs_handlers.get(fs_handler)
  33. i.push(v)
  34. // glob_mx.filmstrip_handlers
  35. }
  36. clog("fs_tile_handlers",fs_tile_handlers)
  37. for ([k,v] of fs_handlers){
  38. // clog("ft0",k,v)
  39. k(v)
  40. }
  41. for ([k,v] of fs_tile_handlers){
  42. // clog("ft",k,v)
  43. k(v)
  44. }
  45. // return
  46. // const custom_thumbs = all_thumbs
  47. var aspect = 16/18
  48. var width = 135
  49. var height = Math.round(width/aspect)
  50. loose_thumbs.css({
  51. 'padding-top': '',
  52. "min-height": `${height}px`,
  53. "min-width": `${width}px`,
  54. width: `${width}px`,
  55. height: `${height}px`,
  56. })
  57. clog("rtscv",fn_name,[that,...args])
  58. }
  59. function onover(){
  60. clog(this,[...arguments])
  61. }