mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-16 16:58:38 +01:00
Properly change device after resizing left nav
Summary: Also allow left nav to hide. Test Plan: # Resize left nav. # Shrink browser width to switch device. # Increase the width again. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3383
This commit is contained in:
parent
6c5a23d85c
commit
8d7f5eefae
3 changed files with 13 additions and 7 deletions
|
@ -1032,7 +1032,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'javelin-behavior-device' =>
|
||||
array(
|
||||
'uri' => '/res/37669d1a/rsrc/js/application/core/behavior-device.js',
|
||||
'uri' => '/res/7f09d952/rsrc/js/application/core/behavior-device.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -1517,7 +1517,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'javelin-behavior-phabricator-nav' =>
|
||||
array(
|
||||
'uri' => '/res/15ceb59f/rsrc/js/application/core/behavior-phabricator-nav.js',
|
||||
'uri' => '/res/575be3cd/rsrc/js/application/core/behavior-phabricator-nav.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
|
|
@ -32,7 +32,7 @@ JX.behavior('device', function(config) {
|
|||
JX.DOM.alterClass(e, 'device-tablet', (device == 'tablet'));
|
||||
JX.DOM.alterClass(e, 'device-desktop', (device == 'desktop'));
|
||||
|
||||
JX.Stratcom.invoke('phabricator-device-change', device);
|
||||
JX.Stratcom.invoke('phabricator-device-change', null, device);
|
||||
}
|
||||
|
||||
JX.Stratcom.listen('resize', null, onresize);
|
||||
|
|
|
@ -151,7 +151,7 @@ JX.behavior('phabricator-nav', function(config) {
|
|||
scale: 1,
|
||||
|
||||
width: JX.Vector.getDim(local).x,
|
||||
minWidth: 38,
|
||||
minWidth: 1,
|
||||
minScale: 1
|
||||
},
|
||||
{
|
||||
|
@ -213,10 +213,16 @@ JX.behavior('phabricator-nav', function(config) {
|
|||
|
||||
// - Navigation Reset ----------------------------------------------------------
|
||||
|
||||
JX.Stratcom.listen('phabricator-device-change', null, function(device) {
|
||||
JX.Stratcom.listen('phabricator-device-change', null, function(event) {
|
||||
app.style.left = '';
|
||||
local && (local.style.left = '');
|
||||
content.style.left = '';
|
||||
if (local) {
|
||||
local.style.left = '';
|
||||
local.style.width = '';
|
||||
}
|
||||
if (drag) {
|
||||
drag.style.left = '';
|
||||
}
|
||||
content.style.marginLeft = '';
|
||||
|
||||
select_button(2);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue