Skip to content

Commit

Permalink
Panel => PanelState
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed Dec 7, 2016
1 parent a6288dd commit c87f45b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const DEFAULT_PANEL_HEIGHT = 2;
* Represents a panel on a grid. Keeps track of position in the grid and what visualization it
* contains.
*
* @typedef PanelState
* @typedef {Object} PanelState
* @property {number} id - Id of the visualization contained in the panel.
* @property {Element} $el - A reference to the gridster widget holding this panel. Used to
* update the size and column attributes. TODO: move out of panel state as this couples state to ui.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DEFAULT_PANEL_WIDTH, DEFAULT_PANEL_HEIGHT } from 'plugins/kibana/dashbo
export class PanelUtils {
/**
* Fills in default parameters where not specified.
* @param panel {Panel}
* @param {PanelState} panel
*/
static initializeDefaults(panel) {
panel.size_x = panel.size_x || DEFAULT_PANEL_WIDTH;
Expand All @@ -23,7 +23,7 @@ export class PanelUtils {

/**
* Ensures that the panel object has the latest size/pos info.
* @param panel {Panel}
* @param {PanelState} panel
*/
static refreshSizeAndPosition(panel) {
const data = panel.$el.coords().grid;
Expand All @@ -37,7 +37,7 @@ export class PanelUtils {
* $el is a circular structure because it contains a reference to it's parent panel,
* so it needs to be removed before it can be serialized (we also don't
* want it to show up in the url).
* @param panel
* @param {PanelState} panel
*/
static makeSerializeable(panel) {
delete panel.$el;
Expand Down

0 comments on commit c87f45b

Please sign in to comment.