EasyUI Forum
November 28, 2021, 10:40:40 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED!] layout expandMode float  (Read 1256 times)
roberto
Jr. Member
**
Posts: 79


View Profile Email
« on: January 17, 2021, 06:35:49 PM »

Hi,
I need to define the west panel floating on the cell phone and docked on the computer. I tried
expandMode = isMobile ()? 'float': 'dock'
isMobile works well, but regardless of the value in expandMode, the panel is still docked
The panel is expanded and collapsed using a button and not using the tool in the title bar
It's possible?
« Last Edit: November 24, 2021, 04:35:47 AM by roberto » Logged
jarry
Administrator
Hero Member
*****
Posts: 2016


View Profile Email
« Reply #1 on: January 18, 2021, 01:23:31 AM »

Please look at this example http://code.reloado.com/ajetan/edit#preview. It works fine.
Logged
roberto
Jr. Member
**
Posts: 79


View Profile Email
« Reply #2 on: January 18, 2021, 04:06:15 AM »

thanks, but I don't want the title to be shown. I need to show the west panel when I click on a button like you did to collapse
Logged
jarry
Administrator
Hero Member
*****
Posts: 2016


View Profile Email
« Reply #3 on: January 18, 2021, 07:34:22 PM »

Please set the 'hideExpandTool' to true to hide the title bar. Here is the updated example

http://code.reloado.com/ajetan/2/edit#preview
Logged
roberto
Jr. Member
**
Posts: 79


View Profile Email
« Reply #4 on: November 18, 2021, 05:02:47 AM »

Hi again
It's an old question, but I still need an answer. Tried drawer but can't fit the panel like the layout does.
Does float no longer work in layout?
Logged
roberto
Jr. Member
**
Posts: 79


View Profile Email
« Reply #5 on: November 18, 2021, 08:05:33 AM »

I notice that clicking on the header the panel appears floated. How to trigger this event?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2016


View Profile Email
« Reply #6 on: November 19, 2021, 12:01:54 AM »

Please call the 'collapse' method to collapse the region panel.
Code:
$(...).layout('collapse','west')
Logged
roberto
Jr. Member
**
Posts: 79


View Profile Email
« Reply #7 on: November 23, 2021, 07:44:12 PM »

Hi,
Tankyou for the answer but my point is very simple: Ok it can expand but docked and I need to float on mobile devices. I can simulate doing something like this:

var west = $('#mylayout'). layout ('panel', 'west');
var b = west.panel('options'). find('.panel body');
b.trigger ('click');

It works the way I want it (but I don't really know if it's safe!), but there's another weird effect: the center region is scrolled all the way to the right :-).
Logged
jarry
Administrator
Hero Member
*****
Posts: 2016


View Profile Email
« Reply #8 on: November 24, 2021, 02:06:40 AM »

On the mobile device, the 'expandMode' can be set to 'float' and the 'collapsedSize' can be set to '0' to hide the collapsed bar.
Code:
<div data-options="region:'west',split:true,border:false,expandMode:'float',hideExpandTool:true,collapsedSize:0" title="west" style="width:150px;">
...
</div>

Call this code to collapse the west panel.
Code:
$(...).layout('expand','west');

Call this code to expand the west panel.
Code:
$(...).layout('panel','expandWest').trigger('click');
Logged
roberto
Jr. Member
**
Posts: 79


View Profile Email
« Reply #9 on: November 24, 2021, 04:38:18 AM »

THANK YOU VERY MUCH  Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!