Skip to content

Commit

Permalink
Merge pull request #419 from palantir/invalidate-layout
Browse files Browse the repository at this point in the history
Invalidate layout - Components now re-layout when something sizing changes
  • Loading branch information
teamdandelion committed May 16, 2014
2 parents f000507 + 9d976a4 commit 6b4a327
Show file tree
Hide file tree
Showing 20 changed files with 624 additions and 258 deletions.
47 changes: 30 additions & 17 deletions plottable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,35 +314,43 @@ declare module Plottable {
}
}
declare module Plottable {
class ComponentGroup extends Component {
class ComponentContainer extends Component {
/**
* Creates a ComponentGroup.
* Returns a list of components in the ComponentContainer
*
* @constructor
* @param {Component[]} [components] The Components in the ComponentGroup.
* @returns{Component[]} the contained Components
*/
constructor(components?: Component[]);
public merge(c: Component): ComponentGroup;
public getComponents(): Component[];
/**
* If the given component exists in the ComponentGroup, removes it from the
* group and the DOM.
* Returns true iff the ComponentContainer is empty.
*
* @param {Component} c The component to be removed.
* @returns {ComponentGroup} The calling ComponentGroup.
* @returns {boolean} Whether the calling ComponentContainer is empty.
*/
public removeComponent(c: Component): ComponentGroup;
public empty(): boolean;
/**
* Removes all Components in the ComponentGroup from the group and the DOM.
* Remove all components contained in the ComponentContainer
*
* @returns {ComponentGroup} The calling ComponentGroup.
* @returns {ComponentContainer} The calling ComponentContainer
*/
public empty(): ComponentGroup;
public removeAll(): ComponentContainer;
}
}
declare module Plottable {
class ComponentGroup extends ComponentContainer {
/**
* Creates a ComponentGroup.
*
* @constructor
* @param {Component[]} [components] The Components in the ComponentGroup.
*/
constructor(components?: Component[]);
public merge(c: Component): ComponentGroup;
public isFixedWidth(): boolean;
public isFixedHeight(): boolean;
}
}
declare module Plottable {
class Table extends Component {
class Table extends ComponentContainer {
/**
* Creates a Table.
*
Expand Down Expand Up @@ -474,6 +482,7 @@ declare module Plottable {
class RenderController {
static enabled: boolean;
static registerToRender(c: Component): void;
static registerToComputeLayout(c: Component): void;
static doRender(): void;
}
}
Expand Down Expand Up @@ -1114,8 +1123,6 @@ declare module Plottable {
public showEndTickLabels(show: boolean): Axis;
public scale(): Scale;
public scale(newScale: Scale): Axis;
public formatter(): (d: any) => string;
public formatter(formatFunction: (d: any) => string): Axis;
/**
* Sets or gets the tick label position relative to the tick marks.
* The exact consequences of particular tick label positionings depends on the subclass implementation.
Expand All @@ -1140,6 +1147,12 @@ declare module Plottable {
public outerTickSize(val: number): Axis;
public tickPadding(): number;
public tickPadding(val: number): Axis;
/**
* Gets the current tick formatting function, or sets the tick formatting function.
*
* @param {(value: any) => string} [formatter] The new tick formatting function.
* @returns The current tick formatting function, or the calling Axis.
*/
public tickFormat(): (value: any) => string;
public tickFormat(formatter: (value: any) => string): Axis;
}
Expand Down
Loading

0 comments on commit 6b4a327

Please sign in to comment.