Skip to content

Latest commit

 

History

History
116 lines (83 loc) · 3.64 KB

SPEC.md

File metadata and controls

116 lines (83 loc) · 3.64 KB
MassBank MultiView JavaScript Plugin

Specification

This library entry point being the msmultiview method. It returns nothing but initializes massbank multiview related all components.

Plugin Components:

  • Multiview windows manager
  • Charts zoomer
  • Mass spectra charts & snapshots

.msmultiview(URL(s) or Page(s) [, Options])

msmultiview

This is the entry method name of this plugin.

URL(s) or Page(s)

Type: String, Multiple Strings or Array
Required

Plugin requires at least one or more mass spectra response URL(s) or Page names(s). Page name(s) only enough for WIKI pages of massbank.nig.ac.jp URL(s).

Options

Type: Object
Optional

"Options" is an optional parameter and it's properties are grouped into few categories according to plugin components. Each category contains configuration properties specified for their components.

Options customizable categories

Options are grouped under few categories which helps to customize multiview plugin. All categories are optional.

var options = {
	/**
     * General Parameters. [Optional]
     */
    param: {
    	chart: { // chart related options },
        apiUrlPrefix: <URL>, // parent URL for data response
    },
    /**
     * Window Manager. [Optional]
     */
    windowsmanager: { // window manager related options },
    /**
     * Chart Zoomer. [Optional]
     */
    chartszoomer: { // chart zoomer related options },
    /**
     * Highcharts. [Optional]
     */
    highcharts: { // Highcharts related options },
    /**
     * Highcharts image. [Optional]
     */
    highchartsImage: { // Highcharts image related options }
}

Options -> General parameters

Key Value Description
apiUrlPrefix URL Prefix String Parent URL for data response
chart.yaxis.label String Title of y-axis
chart.xaxis.label String Title of x-axis
chart.intensitythreshold Integer Threshold value of y-axis. Upper values only shows when chart onload.
chart.height Integer Height of chart view

Multiview Windows Manager

This controller facilitates many features as follow:

  • Order mass spectra information of active window
  • Compare mass spectra information of active window with other windows/tabs.
  • Import mass spectra information from other windows/tabs to active window. In this situation, mv.event.chart.load.success method should re-implement to satisfy each responses according to the necessity.
  • Remove mass spectra information from active window.
  • Error messaging for invalid data URLs.

Options -> Window Manager

Key Value Description
enabled true/false show or hide window manager element

Charts Zoomer

This is a zooming controller of chart views. It supports to zoom-in [+], zoom-out [-] and zoom-default [1:1] displaying charts.

Options -> Charts Zoomer

Key Value Description
enabled true/false show or hide chart zoomer element

Mass Spectra Charts & Snapshoots

Charts and snapshoots are generated by Highcharts library. Their customization could manage according to the information of API.

Options -> Highcharts

Description
Refer the Highcharts API Reference

Options -> Highcharts Image

Description
Refer the Highcharts API Reference