DHTMLX Docs & Samples Explorer

Effects

There are some default effects that can be enabled/disabled in the layout:

  • collapse;
  • resize;
  • highlight.

With the collapse effect you can enable/disable cell collapsing.
The resize effect allows/forbids to change a cell's size.
And with the enabled highlight effect, your layout area will be highlighted during cells's dragging.

To enable/disable effects - use the following code:

dhxLayout.setEffect("resize", true);
dhxLayout.setEffect("resize", false);
  • The first argument - the name of an effect (“collapse”, “resize” or “highlight”)
  • The second argument switches an effect on (true) or off (false).

If you need to get the current state of an effect - use getEffect() method. The name of an event is set as an argument:

var state = dhxLayout.getEffect("resize"); // returns true|false;

The method returns true if the effect is enabled, and false in opposite case.

 
Effects usage increases browser loading. So we recommend to use effects reasonably. On default, layout is adjusted optimally.