You are here

GridStackNative.php in GridStack 8.2

File

src/Plugin/gridstack/engine/GridStackNative.php
View source
<?php

namespace Drupal\gridstack\Plugin\gridstack\engine;


/**
 * Provides a GridStack native CSS Grid layout engine.
 *
 * @GridStackEngine(
 *   id = "gridstack_native",
 *   group = "gridstack",
 *   hidden = "true",
 *   version = "2",
 *   label = @Translation("GridStack native CSS Grid")
 * )
 */
class GridStackNative extends GridStackBase {

  /**
   * Native CSS Grid layout doesn't need DOM rect positions, just dimensions.
   *
   * {@inheritdoc}
   */
  protected $nodes = [
    'width',
    'height',
    'region',
  ];

  /**
   * {@inheritdoc}
   */
  protected $containerClasses = [
    'gridstack--native',
  ];

  /**
   * {@inheritdoc}
   */
  public function attach(array &$load, array $attach = []) {
    parent::attach($load, $attach);
    $load['library'][] = 'gridstack/native';
  }

}

Classes

Namesort descending Description
GridStackNative Provides a GridStack native CSS Grid layout engine.