This extension is for situations that require a dynamic approach to the rules of your responsive design setup. It allows you to go way beyond the setup you can create in the regular Frontend. Hype LayoutKit creates a callback you can us to feed Hype a specific layout based on your own rules and settings (including MediaQueries written in JS).
function lockLayout(hypeDocument, element, event){
// get my checkbox cross by id
var checkboxCross = hypeDocument.getElementById('checkbox-cross');
// switch based on visibility of checkbox cross
if (hypeDocument.getElementProperty(checkboxCross, 'opacity')==0){
// remember layout, engage lock, show checkbox cross
hypeDocument._currentLayout = hypeDocument.currentLayoutName();
hypeDocument.onLayoutRequest = function(layoutName, sceneName){
return hypeDocument._currentLayout;
}
hypeDocument.setElementProperty(checkboxCross, 'opacity', 1, 0.2, 'easeinout');
} else {
// forget layout, delete lock, hide checkbox cross
delete (hypeDocument._currentLayout);
delete (hypeDocument.onLayoutRequest);
hypeDocument.setElementProperty(checkboxCross, 'opacity', 0, 0.2, 'easeinout');
}
}
Just the tip of the iceberg. More examples will follow (inluding matchMedia).