123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- clog("!")
-
-
-
-
-
-
- glob_mx.filmstrip_handlers = glob_mx.filmstrip_handlers || {}
-
-
-
-
-
-
- dflt_css = {
-
- 'padding-top': '',
- "min-height": ``,
- "min-width": ``,
- width: ``,
- height: ``,
-
- }
- function resize_thumbs(thumbs,css){
- const computed_css = Object.assign({},dflt_css,css)
- var k,v
- for ([k,v] of Object.entries(computed_css)){
- Number(v) ? computed_css[k] = v + "px" : 0
- }
- // clog("RTHUMBS")
- thumbs.css(computed_css)
-
- }
- function resize_thumbs_vertical(cont){
- const computed_css = Object.assign({},dflt_css)
-
- var aspect = 16/9
- var width = 335
- var thumbs = $(cont).children(".small_vid")
- width = $(cont).width() - 1
- // computed_css["--v_index"]=`"VERT"`
- var height = Math.round(width/aspect)
- computed_css.height = height
- computed_css["min-height"] = height
- computed_css.width = width
- computed_css["min-width"] = width
- var k,v
- for ([k,v] of Object.entries(computed_css)){
- Number(v) ? computed_css[k] = v + "px" : 0
- }
- // clog("RTHUMBS")
- thumbs.css(computed_css)
-
- }
-
- function resize_thumbs_horizontal(cont){
- const computed_css = Object.assign({},dflt_css)
-
- var aspect = 16/9
- var width = 335
- // computed_css["--v_index"]=`"horizontal"`
- var thumbs = $(cont).children(".small_vid")
- width = ($(cont).height() * aspect)
- width = ($(cont).height() * aspect) - 1
- var height = Math.round(width/aspect)
- computed_css.height = height
- computed_css.width = width
- var k,v
- for ([k,v] of Object.entries(computed_css)){
- Number(v) ? computed_css[k] = v + "px" : 0
- }
- // clog("RTHUMBS")
- thumbs.css(computed_css)
-
-
- }
-
- function resize_thumbs_center(cont){
- const computed_css = Object.assign({},dflt_css)
-
- var aspect = 16/9
- var width = 335
- // computed_css["--v_index"]=`"horizontal"`
- var thumbs = $(cont).children(".small_vid")
- width = ($(cont).height() * aspect)
- width = ($(cont).height() * aspect) - 1
- var height = Math.round(width/aspect)
- computed_css.height = height
- computed_css.width = width
- var k,v
- for ([k,v] of Object.entries(computed_css)){
- Number(v) ? computed_css[k] = v + "px" : 0
- }
- // clog("RTHUMBS")
- thumbs.css(computed_css)
-
-
- }
-
-
- function resize_filmstrips(that,fn_name,args=[]){
-
- }
- function resize_filmstrips2(that,fn_name,args=[]){
-
- }
-
-
- function resizeThumbnailsForCustomView(that,fn_name,args=[]){
- const thumbs = glob_react.Filmstrip._getThumbs()
- const all_thumbs = $(".small_vid")
- const custom_thumbs = all_thumbs.not(thumbs.remlocThumbs)
- const vid_containers = $(".vid_container")
- const loose_thumbs = custom_thumbs.not(vid_containers.children())
- var k,v
- for (v of vid_containers){
- // clog(":",v,v.dataset.fs_type)
- switch (v.dataset.fs_type){
- case "vertical":{
- resize_thumbs_vertical(v)
- /*
- resize_thumbs($(v).children(".small_vid"),{
- width: `${100}px`,
- height: `${100}px`,
- })
- */
- break;
- }
- case "horizontal":{
- resize_thumbs_horizontal(v)
-
- break;
- }
- case "single":{
- resize_thumbs_center(v)
-
- break;
- }
-
- default:{
-
- break;
- }
- clog("HI")
- }
- }
- // return
- // const custom_thumbs = all_thumbs
-
- var aspect = 16/18
- var width = 135
- var height = Math.round(width/aspect)
- loose_thumbs.css({
- 'padding-top': '',
- "min-height": `${height}px`,
- "min-width": `${width}px`,
- width: `${width}px`,
- height: `${height}px`,
- })
-
- clog("rtscv",fn_name,[that,...args])
-
-
- }
-
-
-
-
- function calc_fs_dims0(){
- const hd_w = 16
- const hd_h = 9
-
- const aspect_ratio_hd = hd_w / hd_h
-
- const aspect_ratio_65 = (hd_w * 6) / (hd_h * 5)
- const aspect_ratio_64 = (hd_w * 6) / (hd_h * 4)
-
-
- const state = APP.store.getState();
- var { clientHeight, clientWidth } = state['features/base/responsive-ui'];
- var avail_width =clientWidth
- var avail_height =clientHeight - 100
-
-
-
- var dim_hd = glob_dev_fns.calculateThumbnailSizeForTileView_dev({
- columns:1,
- visibleRows:1,
- clientWidth:avail_width,
- clientHeight:avail_height,
- TILE_ASPECT_RATIO:TILE_ASPECT_RATIO ,
- verticalMargin:0,
- // sideMargins=0,
- // topBottomPadding:100,
- })
-
-
- var dim_65 = glob_dev_fns.calculateThumbnailSizeForTileView_dev({
- columns:1,
- visibleRows:1,
- clientWidth:avail_width,
- clientHeight:avail_height,
- TILE_ASPECT_RATIO:aspect_ratio_65 ,
- verticalMargin:0,
- // sideMargins=0,
- // topBottomPadding:100,
- })
-
- var dim_64 = glob_dev_fns.calculateThumbnailSizeForTileView_dev({
- columns:1,
- visibleRows:1,
- clientWidth:avail_width,
- clientHeight:avail_height,
- TILE_ASPECT_RATIO:aspect_ratio_64 ,
- verticalMargin:0,
- // sideMargins=0,
- // topBottomPadding:100,
- })
- clog("~~",dim_hd)
-
-
-
-
- resize_thumbs_proto($(".a1"),{
- width:clientWidth,
- height:clientHeight,
- "--vtext":`"window"`
- })
- resize_thumbs_proto($(".a2"),{
- width:avail_width,
- height:avail_height,
- "--vtext":`"avail"`
- })
-
-
- resize_thumbs_proto($(".b2"),[dim_hd,
- {
- "--vtext":`"dim_hd"`
- },])
-
- resize_thumbs_proto($(".b3"),[dim_65,
- {
- "--vtext":`"dim_65"`
- },])
-
- resize_thumbs_proto($(".b4"),[dim_64,
- {
- "--vtext":`"dim_64"`
- },])
- let w5,h5,w53,h53,w54,h54
- h5 = dim_hd.height/5
- w5 = dim_hd.width/5
-
- w53 = w5 * 3
- h53 = h5 * 3
- w54 = w5 * 4
- h54 = h5 * 4
- resize_thumbs_proto($(".a3z"),[
- {
- width:w5,
- height:h5,
- "--vtext":`"t5"`
- },])
-
-
- resize_thumbs_proto($(".a4"),[
- {
- width:dim_hd.width,
- height:h5,
- "--vtext":`"top_fs"`
- },])
- resize_thumbs_proto($(".a5"),[
- {
- width:w5,
- height:h53,
- top:h5,
- "--vtext":`"left_fs"`,
- },])
-
- resize_thumbs_proto($(".a6"),[
- {
- width:w5,
- height:h53,
- top:h5,
- left:w54,
- // right:0,
- "--vtext":`"right_fs"`,
- },])
-
- resize_thumbs_proto($(".a7"),[
- {
- width:dim_hd.width,
- height:h5,
- top:h54,
- // left:w54,
- // right:0,
- "--vtext":`"bottom_fs"`,
- },])
-
-
-
- // resize_thumbs_proto($(".b2"),dim_hd)
-
-
-
- }
- function calc_fs_dims(){
- const hd_w = 16
- const hd_h = 9
-
- const aspect_ratio_hd = hd_w / hd_h
-
- const aspect_ratio_65 = (hd_w * 6) / (hd_h * 5)
- const aspect_ratio_64 = (hd_w * 6) / (hd_h * 4)
-
-
- const state = APP.store.getState();
- var { clientHeight, clientWidth } = state['features/base/responsive-ui'];
- var avail_width =clientWidth
- var avail_height =clientHeight - 100
-
-
-
- var dim_hd = glob_dev_fns.calculateThumbnailSizeForTileView_dev({
- columns:1,
- visibleRows:1,
- clientWidth:avail_width,
- clientHeight:avail_height,
- TILE_ASPECT_RATIO:TILE_ASPECT_RATIO ,
- verticalMargin:0,
- // sideMargins=0,
- // topBottomPadding:100,
- })
- let w5,h5,w53,h53,w54,h54
- h5 = dim_hd.height/5
- w5 = dim_hd.width/5
-
- w53 = w5 * 3
- h53 = h5 * 3
- w54 = w5 * 4
- h54 = h5 * 4
-
-
-
-
- // fs_type: "vertical"
- resize_thumbs_proto($(".ic1"),[
- {
- width:dim_hd.width,
- height:h5,
- "--vtext":`"top_fs"`,
- // data:{fs_type: "vertical"},
- data:{fs_type: "horizontal",},
- },])
-
-
- resize_thumbs_proto($(".ic2"),[
- {
- width:w5,
- height:h53,
- top:h5,
-
- "--vtext":`"left_fs"`,
- data:{fs_type: "vertical"},
- },])
-
- resize_thumbs_proto($(".ic3"),[
- {
- width:w5,
- height:h53,
- top:h5,
- left:w54,
- // left:0,
- // right:0,
- "--vtext":`"right_fs"`,
- data:{fs_type: "vertical"},
- },])
-
- resize_thumbs_proto($(".ic6"),[
- {
- width:dim_hd.width,
- height:h5,
- top:h54,
- left:0,
- // left:w54,
- // right:0,
- "--vtext":`"bottom_fs"`,
- data:{fs_type: "horizontal"},
- },])
-
-
- resize_thumbs_proto($(".ic4"),[
- {
- width:w53,
- height:h53,
- height:h53,
- top:h5,
- left:w5,
- // left:w54,
- // right:0,
- "--vtext":`"center"`,
- data:{fs_type: "single"},
- },])
-
- }
-
-
-
- function new_move(){
- var j
- try {
- j = jc(window.sorted_tiles)
- } catch (err) {
- clog("NEW MOVE err:",err)
- }
- // var j = $(".small_vid")
- $(".ic1").append(j.splice(2,5))
- $(".ic2").append(j.splice(0,3))
- $(".ic3").append(j.splice(0,3))
- $(".ic6").append(j.splice(0,5))
- $(".ic4").append(j.splice(0,1))
- }
-
- function move_info(){
- var j = $(".small_vid")
- var k,v
- for (v of j){
- clog(v)
- }
- // $(".ic1").append(j.splice(2,5))
- // $(".ic2").append(j.splice(0,3))
- // $(".ic3").append(j.splice(0,3))
- // $(".ic6").append(j.splice(0,5))
- // $(".ic4").append(j.splice(0,1))
- }
-
-
- if (window.saftly_remove){
- init_api6()
- // calc_fs_dims0()
- calc_fs_dims()
- new_move()
- // get_avail_width()
- // clog("REZIE PROTO READY")
- }
-
-
-
|