File

lib/ngx-responsivemenu/model/overflow.model.ts

Description

holds informations which are used from overflow control

Index

Methods
Accessors

Methods

Public isOverflow
isOverflow()

returns true if overflow is not empty

Returns : boolean

Accessors

items
getitems()

get items which should rendered to overflow

Returns : MenuItemDirective[]
setitems(items: [])

set items which should rendered to overflow

Parameters :
Name Type Optional
items [] No
Returns : void
import { MenuItemDirective } from "../directives/menu-item.directive";

/**
 * holds informations which are used from overflow control
 */
export class OverflowModel {

    /**
     * hold all overflow items
     */
    private overflowItems: MenuItemDirective[] = [];

    /**
     * set items which should rendered to overflow
     */
    public set items(items: MenuItemDirective[]) {
        this.overflowItems = items;
    }

    /**
     * get items which should rendered to overflow
     */
    public get items(): MenuItemDirective[] {
        return this.overflowItems;
    }

    /**
     * returns true if overflow is not empty
     */
    public isOverflow() {
        return this.items.length > 0;
    }
}

result-matching ""

    No results matching ""