Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As I can see with Chrome inspector, they are first separated in two columns, with position:absolute. The one on the left with a "left" css property set, and the one on the right with a "right" css property set.</p> <p>Then each columns have two rows, that use the same method, the other way around (with top and bottom css properties set).</p> <p>Then javascript comes in. When the handle is dragged, each column or row couple's height or width are changed to give the same sum.</p> <p><strong>EDIT :</strong> Here you can see some javascript from jsfiddle. </p> <p>onDrag_horizontal resizes two rows of a column. It takes the position of the handle h (<code>var top = (h.getPosition(this.content).y + h.getHeight() / 2) / this.content.getHeight() * 100;</code>) and then sets the height of the two rows accordingly</p> <pre><code>var onDrag_horizontal = function(h) { var windows = h.getParent().getElements('.window'); var top = (h.getPosition(this.content).y + h.getHeight() / 2) / this.content.getHeight() * 100; windows[0].setStyle('height', top + '%'); windows[1].setStyle('height', 100 - top + '%'); }.bind(this); </code></pre> <p>onDrag_vertical does the same thing, but with the vertical handle, which resizes the two columns</p> <pre><code>var onDrag_vertical = function(h) { var left = (h.getPosition(this.content).x + h.getWidth() / 2) / this.content.getWidth() * 100; this.columns[0].setStyle('width', left + '%'); this.columns[1].setStyle('width', 100 - left + '%'); }.bind(this); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload