forked from Botanical/BotanJS
Responsive Ratio is now set to 1.2
This commit is contained in:
parent
f42ea7e190
commit
82451a41b9
@ -25,7 +25,7 @@ header {
|
||||
filter: blur( 2px );
|
||||
}
|
||||
|
||||
#menu > *[active] {
|
||||
#menu > *[data-active] {
|
||||
-webkit-filter: blur( 0px );
|
||||
filter: blur( 0px );
|
||||
color: rgba( 128, 0, 128, 1 );
|
||||
|
@ -7,6 +7,8 @@
|
||||
var Trigger = __import( "System.Cycle.Trigger" );
|
||||
/** @type {System.utils.IKey} */
|
||||
var IKey = __import( "System.utils.IKey" );
|
||||
/** @type {System.utils.DataKey} */
|
||||
var DataKey = __import( "System.utils.DataKey" );
|
||||
/** @type {Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {Dandelion.IDOMObject} */
|
||||
@ -93,10 +95,11 @@
|
||||
Dand.id( "menu", true ).foreach(
|
||||
1, function( e )
|
||||
{
|
||||
e = IDOMElement( e );
|
||||
topButtons.push( e );
|
||||
if( e.getAttribute( "active" ) !== null )
|
||||
if( e.getDAttribute( "active" ) !== null )
|
||||
{
|
||||
e.setAttribute( "master", true );
|
||||
e.setAttribute( new DataKey( "master", true ) );
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -153,7 +156,7 @@
|
||||
var ratio = wsupp.clientWidth / wsupp.clientHeight;
|
||||
|
||||
// Swap only on ration changes from 1 < x OR x < 1
|
||||
if( ( ratio < 1 && 1 < rspd_ratio ) || ( 1 < ratio && rspd_ratio < 1 ) || override )
|
||||
if( ( ratio < 1.2 && 1.2 < rspd_ratio ) || ( 1.2 < ratio && rspd_ratio < 1.2 ) || override )
|
||||
{
|
||||
rspd_ratio = ratio;
|
||||
debug.Info( "Responsive Event: R = " + ratio );
|
||||
@ -182,8 +185,8 @@
|
||||
|
||||
horizon.style.backgroundColor = "dimgray";
|
||||
|
||||
for( var i in topButtons ) topButtons[i].removeAttribute( "active" );
|
||||
contact.setAttribute( "active", "" );
|
||||
for( var i in topButtons ) topButtons[i].removeAttribute( "data-active" );
|
||||
contact.setAttribute( new DataKey( "active" ) );
|
||||
|
||||
c_expand = true;
|
||||
};
|
||||
@ -211,13 +214,13 @@
|
||||
|
||||
for( var i in topButtons )
|
||||
{
|
||||
if( topButtons[i].getAttribute( "master" ) )
|
||||
if( topButtons[i].getDAttribute( "master" ) )
|
||||
{
|
||||
topButtons[i].setAttribute( "active", "" );
|
||||
topButtons[i].setAttribute( new DataKey( "active" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
topButtons[i].removeAttribute( "active" );
|
||||
topButtons[i].removeAttribute( "data-active" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
, function( e ) {
|
||||
rspd.foreach(
|
||||
document.ELEMENT_NODE
|
||||
, e.data.ratio < 1
|
||||
, e.data.ratio < 1.2
|
||||
? function( elem ) { elem.style.width = "100%"; }
|
||||
: function( elem ) { elem.style.width = ""; }
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user