Sha256: 5e39eefd907b5714e64e8130f18cd56191e822008b882098758a89cc9834b9d7

Contents?: true

Size: 1.12 KB

Versions: 67

Compression:

Stored size: 1.12 KB

Contents

//Contains bottom view as key and a the values are also a hash
//that contains the 'top' thing
//{
//  'nav_container' =>
//    {
//      'nav_container' => 'name'
//    }
//}
int_segue_interceptors = {
}

//Contains an array 

//Register a segue intercept
//name - The name of the segue to be given if_segue_do
//from_view_name - The name of the bottom view to intercept
//to_view_name - The name of the top view to intercept

function reg(name, from_view_name, to_view_name) {
  //Create hash if it dosen't already exist
  int_segue_interceptors[from_view_name] = int_segue_interceptors[from_view_name] || {};
  int_segue_interceptors[from_view_name][to_view_name] = name;
}

//Will send the 'if' commands
function intercept_if_necessary(bottom_view_name, top_view_name, from_vp, to_vp) {
  if (int_segue_interceptors[bottom_view_name] && int_segue_interceptors[bottom_view_name][top_view_name]) {
    var rez = int_segue_interceptors[bottom_view_name][top_view_name];

    SEND("main", "if_segue_do", rez, from_vp, to_vp);
  }
}

reg("modal", "nav_container", "nav_container.detach");
reg("unmodal", "nav_container", "nav_container.attach");

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
flok-0.0.105 app/kern/mod/segue.js
flok-0.0.103 app/kern/mod/segue.js
flok-0.0.102 app/kern/mod/segue.js
flok-0.0.101 app/kern/mod/segue.js
flok-0.0.100 app/kern/mod/segue.js
flok-0.0.99 app/kern/mod/segue.js
flok-0.0.98 app/kern/mod/segue.js
flok-0.0.97 app/kern/mod/segue.js
flok-0.0.96 app/kern/mod/segue.js
flok-0.0.95 app/kern/mod/segue.js
flok-0.0.94 app/kern/mod/segue.js
flok-0.0.93 app/kern/mod/segue.js
flok-0.0.92 app/kern/mod/segue.js
flok-0.0.91 app/kern/mod/segue.js
flok-0.0.90 app/kern/mod/segue.js
flok-0.0.89 app/kern/mod/segue.js
flok-0.0.88 app/kern/mod/segue.js
flok-0.0.87 app/kern/mod/segue.js
flok-0.0.86 app/kern/mod/segue.js
flok-0.0.85 app/kern/mod/segue.js