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.84 app/kern/mod/segue.js
flok-0.0.83 app/kern/mod/segue.js
flok-0.0.82 app/kern/mod/segue.js
flok-0.0.81 app/kern/mod/segue.js
flok-0.0.80 app/kern/mod/segue.js
flok-0.0.79 app/kern/mod/segue.js
flok-0.0.78 app/kern/mod/segue.js
flok-0.0.77 app/kern/mod/segue.js
flok-0.0.76 app/kern/mod/segue.js
flok-0.0.75 app/kern/mod/segue.js
flok-0.0.74 app/kern/mod/segue.js
flok-0.0.73 app/kern/mod/segue.js
flok-0.0.72 app/kern/mod/segue.js
flok-0.0.71 app/kern/mod/segue.js
flok-0.0.70 app/kern/mod/segue.js
flok-0.0.69 app/kern/mod/segue.js
flok-0.0.68 app/kern/mod/segue.js
flok-0.0.67 app/kern/mod/segue.js
flok-0.0.66 app/kern/mod/segue.js
flok-0.0.65 app/kern/mod/segue.js