MaximizePlugin ⇒ Weavy.plugins.maximize

Plugin for enabling maximize button. Enable the button by setting options { controls: { maximize: true }} on an app or a panel or by manually using the maximize method.

Kind: global plugin
Example
var weavy = new Weavy();
var space = weavy.space({
  key: "myspace" 
});

// Built-in maximize button
var app = weavy.app({
  key: "myfiles",
  type: "files"
  container: "#mycontainer"
  controls: {
    maximize: true
  }
});

// Built-in maximize button with custom maximize styling
var app = weavy.app({
  key: "myfiles",
  type: "files"
  container: "#mycontainer"
  controls: {
    maximize: {
      top: "3rem"
    }
  }
});
Example
var weavy = new Weavy();
var space = weavy.space({
  key: "myspace"
});
var app = weavy.app({
  key: "myfiles",
  type: "files"
  container: "#mycontainer"
});

// Set maximize using custom buttons

// Maximize
$("#myMaxButton").on("click", function() {
  app.panel.maximize(true);
});

// Restore
$("#myRestoreButton").on("click", function() {
  app.panel.maximize(false);
});

// Toggle and custom style
$("#myToggleButton").on("click", function() {
  app.panel.maximize(null, { top: "3rem" });
});

panel.maximize([maximize], [styles])

Toggling maximized mode on a panel. This means the panel will try to take up the whole window. You may add additional styles as properties in a styles object to fine tune the layout/position in your environment.

Kind: instance method of MaximizePlugin
ParamDescription
[maximize : boolean ]

Set true to maximize, false to restore, null to toggle (default).

[styles : Object ]

Object with style properties to override on the panel. The names must be the same as style names used in HTMLElement.styles