123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
-
-
-
-
- function FS_dec(fn) {
- return function() {
- dec_fns[fn.name] && dec_fns[fn.name].pre ? dec_fns[fn.name].pre({that:this, arguments}) : 1
- const ret = fn.apply(this, arguments);
- // console.log('FSD',fn.name,ret, [this,...arguments]);
- const ret2 = dec_fns[fn.name] && dec_fns[fn.name].post ? dec_fns[fn.name].post({that:this, arguments}) : 0
- if (ret2){
- return ret2.ret
- }
- // const result = fn.apply(this, arguments);
- // console.log('Finished');
- return ret;
- }
- }
-
-
-
-
-
-
-
- function save_orig(){
- console.trace("SAVE-ORIG")
- glob_orig = window.glob_orig || {
- Filmstrip:{},
- fs:{},
- rf_filmstrip:{},
- }
-
-
- glob_orig.Filmstrip = Object.assign({},glob_react.Filmstrip)
- glob_orig.fs = Object.assign({},glob_react.fs)
- glob_orig.rf_filmstrip = Object.assign({},glob_react.rf_filmstrip)
- save_orig = nop
- }
-
-
-
-
- if (window.glob_orig){
-
- save_orig = nop
- // save_orig()
- }
- if (!window.glob_orig && window.glob_react){
-
- // save_orig = nop
- save_orig()
- }
- if (window.glob_orig && window.glob_react){
- dec_fs()
- // save_orig = nop
- // save_orig()
- }
-
- // if ((!window.glob_orig) && ){
-
- // }
-
- // glob_react.rf_filmstrip.calculateThumbnailSizeForTileView
-
- // calculateThumbnailSizeForTileView
-
- dec_fns = {
- resizeThumbnailsForTileView:{
- pre:function(){
- // console.trace("resizeThumbnailsForTileView")
-
- },
- post:function(){
-
- },
-
- }
- }
-
-
- function rt(w,h = 0,force = true){
- h ? 0 : h = w / (16/9)
- glob_react.Filmstrip.resizeThumbnailsForTileView(w,h,force)
- }
-
- function dec_fs2(){
- var k,v
- glob_react.rf_filmstrip.calculateThumbnailSizeForTileView = FS_dec(glob_react.rf_filmstrip.calculateThumbnailSizeForTileView)
-
- // for ([k,v] of Object.entries(glob_orig.Filmstrip)){
- // for ([k,v] of Object.entries(glob_react.Filmstrip)){
- // clog("~",k,v.name)
- // glob_react.Filmstrip[k] = FS_dec(v)
- // }
-
- }
-
-
-
- function dec_fs(){
- var k,v
- for ([k,v] of Object.entries(glob_orig.Filmstrip)){
- // for ([k,v] of Object.entries(glob_react.Filmstrip)){
- clog("~",k,v.name)
- glob_react.Filmstrip[k] = FS_dec(v)
- }
-
- }
- fs_dec_list = ["resizeThumbnailsForHorizontalView",
- "resizeThumbnailsForVerticalView",
- "resizeThumbnailsForTileView",]
-
- function dec_fs_resize(){
- var k,v
- save_orig()
-
- for (k of fs_dec_list){
- clog("~",k)
- }
- // return
- for ([k,v] of Object.entries(glob_orig.Filmstrip)){
- // for ([k,v] of Object.entries(glob_react.Filmstrip)){
- clog("~",k,v.name,v)
- // glob_react.Filmstrip[k] = FS_dec(v)
- }
-
- }
-
-
-
- modkeys = ["calculateThumbnailSizeForTileView",
- "TILE_VIEW_SIDE_MARGINS",
- "SET_TILE_VIEW_DIMENSIONS",]
-
- // glob_react.rf_filmstrip
- function check_mod_keys(){
- var k
- for (k of modkeys){
- clog(k,glob_react.rf_filmstrip[k])
- }
-
- }
|