Page class

The Page class gives you access to pages in D3PLOT. More...

The D3PLOT JavaScript API provides many class constants, properties and methods. For Arup to be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:

Class functions

Member functions

Page constants

Constants for Layout

Name Description
Page.LAYOUT_1_1 Layout with 1x1 windows per page
Page.LAYOUT_2_2 Layout with 2x2 windows per page
Page.LAYOUT_3_3 Layout with 3x3 windows per page
Page.LAYOUT_CUSTOM Custom layout with user defined numer of windows per page
Page.LAYOUT_TILE_TALL Layout with tall tiles
Page.LAYOUT_TILE_WIDE Layout with wide tiles

Page properties

Name Type Description
layout constant The page layout. See Page layout constants
number (read only) integer The page number
x integer The number of windows in X for the LAYOUT_CUSTOM case
y integer The number of windows in Y for the LAYOUT_CUSTOM case

Detailed Description

The Page class allows you to modify pages in D3PLOT. There are various methods and properties available that allow you do alter how windows are displayed on pages. See the documentation below for more details.

Details of functions

First() [static]

Description

Returns the Page object for the first page in D3PLOT

Arguments

No arguments

Returns

Page object

Return type

Page

Example

To get the Page object for the first page:

var p = Page.First();


GetFromID(page number[integer]) [static]

Description

Returns the Page object for a page ID

Arguments

  • page number (integer)

    number of the page you want the Page object for

    Returns

    Page object

    Return type

    Page

    Example

    To get the Page object for page number 1

    var p = Page.GetFromID(1);


    Last() [static]

    Description

    Returns the Page object for the last page in D3PLOT

    Arguments

    No arguments

    Returns

    Page object

    Return type

    Page

    Example

    To get the Page object for the last page:

    var p = Page.Last();


    Next()

    Description

    Returns the next page (or null if there is not one)

    Arguments

    No arguments

    Returns

    Page object

    Return type

    Page

    Example

    To get the page after page p:

    p = p.Next();


    Previous()

    Description

    Returns the previous page (or null if there is not one)

    Arguments

    No arguments

    Returns

    Page object

    Return type

    Page

    Example

    To get the page before page p:

    p = p.Previous();


    Show()

    Description

    Shows this page in D3PLOT

    Arguments

    No arguments

    Returns

    No return value

    Example

    To show page p:

    p.Show();


    Total() [static]

    Description

    Returns the total number of pages in D3PLOT.

    Arguments

    No arguments

    Returns

    Total number of pages

    Return type

    integer

    Example

    To get total number of pages:

    var total = Page.Total();