Skip to content

Commit

Permalink
Update the compiled javascripts and typing files
Browse files Browse the repository at this point in the history
  • Loading branch information
teamdandelion committed Mar 1, 2014
1 parent 4058ab7 commit 059f9f1
Show file tree
Hide file tree
Showing 2 changed files with 266 additions and 92 deletions.
55 changes: 42 additions & 13 deletions plottable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
declare module Utils {
function inRange(x: number, a: number, b: number): boolean;
function getBBox(element: D3.Selection): SVGRect;
function truncateTextToLength(text: string, length: number, element: D3.Selection): string;
function getTextHeight(textElement: D3.Selection): number;
}
declare class Component {
private static clipPathId;
Expand All @@ -17,15 +19,19 @@ declare class Component {
private colMinimumVal;
public availableWidth: number;
public availableHeight: number;
public xOffset: number;
public yOffset: number;
public xOrigin: number;
public yOrigin: number;
private xOffsetVal;
private yOffsetVal;
public xAlignProportion: number;
public yAlignProportion: number;
private cssClasses;
private xAlignProportion;
private yAlignProportion;
public anchor(element: D3.Selection): Component;
public xAlign(alignment: string): Component;
public yAlign(alignment: string): Component;
public computeLayout(xOffset?: number, yOffset?: number, availableWidth?: number, availableHeight?: number): Component;
public xOffset(offset: number): Component;
public yOffset(offset: number): Component;
public computeLayout(xOrigin?: number, yOrigin?: number, availableWidth?: number, availableHeight?: number): Component;
public render(): Component;
private addBox(className?, parentElement?);
public generateClipPath(): void;
Expand Down Expand Up @@ -66,6 +72,9 @@ declare class LinearScale extends QuantitiveScale {
constructor(scale: D3.Scale.LinearScale);
public copy(): LinearScale;
}
declare class ColorScale extends Scale {
constructor(scaleType?: string);
}
declare class Interaction {
public hitBox: D3.Selection;
public componentToListenTo: Component;
Expand Down Expand Up @@ -114,8 +123,6 @@ declare class ZoomCallbackGenerator {
}
declare class Label extends Component {
private static CSS_CLASS;
public xAlignment: string;
public yAlignment: string;
private textElement;
private text;
private orientation;
Expand All @@ -125,7 +132,7 @@ declare class Label extends Component {
public anchor(element: D3.Selection): Label;
public setText(text: string): void;
private measureAndSetTextSize();
private truncateTextToLength(availableLength);
private truncateTextAndRemeasure(availableLength);
public computeLayout(xOffset?: number, yOffset?: number, availableWidth?: number, availableHeight?: number): Label;
}
declare class TitleLabel extends Label {
Expand Down Expand Up @@ -201,17 +208,25 @@ declare class Table extends Component {
private colWeights;
private rowWeightSum;
private colWeightSum;
constructor(rows: Component[][], rowWeightVal?: number, colWeightVal?: number);
private guessRowWeight;
private guessColWeight;
constructor(rows?: Component[][]);
public addComponent(row: number, col: number, component: Component): Table;
private padTableToSize(nRows, nCols);
public anchor(element: D3.Selection): Table;
public computeLayout(xOffset?: number, yOffset?: number, availableWidth?: number, availableHeight?: number): Table;
private static rowProportionalSpace(rows, freeHeight);
private static colProportionalSpace(cols, freeWidth);
private static calculateProportionalSpace(componentGroups, freeSpace, spaceAccessor);
public render(): Table;
public rowWeight(): number;
public rowWeight(newVal: number): Table;
public colWeight(): number;
public colWeight(newVal: number): Table;
public rowMinimum(): number;
public rowMinimum(newVal: number): Component;
public rowMinimum(newVal: number): Table;
public colMinimum(): number;
public colMinimum(newVal: number): Component;
public colMinimum(newVal: number): Table;
public padding(rowPadding: number, colPadding: number): Table;
}
declare class ScaleDomainCoordinator {
Expand All @@ -220,6 +235,19 @@ declare class ScaleDomainCoordinator {
constructor(scales: Scale[]);
public rescale(scale: Scale): void;
}
declare class Legend extends Component {
private static CSS_CLASS;
private static SUBELEMENT_CLASS;
private static MARGIN;
private colorScale;
private maxWidth;
constructor(colorScale?: ColorScale);
public scale(scale: ColorScale): Legend;
public rowMinimum(): number;
public rowMinimum(newVal: number): Legend;
private measureTextHeight();
public render(): Legend;
}
declare class Axis extends Component {
public scale: Scale;
public orientation: string;
Expand Down Expand Up @@ -249,8 +277,9 @@ declare class YAxis extends Axis {
}
declare class ComponentGroup extends Component {
private components;
constructor(components: Component[]);
constructor(components?: Component[]);
public addComponent(c: Component): ComponentGroup;
public anchor(element: D3.Selection): ComponentGroup;
public computeLayout(xOffset?: number, yOffset?: number, availableWidth?: number, availableHeight?: number): ComponentGroup;
public computeLayout(xOrigin?: number, yOrigin?: number, availableWidth?: number, availableHeight?: number): ComponentGroup;
public render(): ComponentGroup;
}
Loading

0 comments on commit 059f9f1

Please sign in to comment.