Ticket #148 (closed Task: fixed)

Opened 12 years ago

Last modified 12 years ago

question: controlling splitpanel layout/width proportions programmatically

Reported by: Malte Owned by: jri
Priority: Trivial Milestone:
Component: DeepaMehta Standard Distribution Version: 4.0.5
Keywords: Cc:
Complexity: 2 Area: GUI
Module: deepamehta-webclient


on clientside when extending the webclient with a xyz_plugin.js is there already a possibility to control the splitpanel layout/width size from within a xyz_plugin.js?

for some types i want to hide the content_/page_panel (where the same result like dragging the splitpanel to the most left position would be sufficient) while for others i want to show it..

thanks in advance for your help!

Change History

comment:1 Changed 12 years ago by jri

  • Status changed from new to accepted
  • Complexity changed from 1 to 2

No, for the moment the split panel's resize handle can't be moved programatically. There is no such public method. I'll fix that quickly.

comment:2 Changed 12 years ago by Jörg Richter

Webclient: access split panel's slider (#148).

Plugins can set/get the split panel's slider position programmatically.

Set the slider's position:


The argument is the width of the left panel.

To set the slider to the rightmost position you can do something like this:

    dm4c.split_panel.set_slider_position(window.innerWidth - 36)

However, it's not optimal: unwanted window scroll bars appear as the content panel's Edit button still occupies space. Even if the content panel is empty (no topic selected), there are still some margins which occupy space.

So, setting the slider to the rightmost position is probably not the proper approach for your case, which actually is: show/hide the content panel. There is currently no support for doing this (as far as I know). You could open a separate ticket.

Get the slider's position:

    var pos = dm4c.split_panel.get_slider_position()

See ticket 148.

Last edited 12 years ago by jri (previous) (diff)

comment:3 Changed 12 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.