Skip to content

Commit

Permalink
Merge pull request #2948 from palantir/r1.16.2
Browse files Browse the repository at this point in the history
Release version 1.16.2 (--> master)
  • Loading branch information
jtlan committed Nov 6, 2015
2 parents cc5dcb8 + c5f7060 commit 407b10e
Show file tree
Hide file tree
Showing 19 changed files with 1,975 additions and 2,490 deletions.
5 changes: 2 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ module.exports = function(grunt) {
testname: "Plottable Sauce Unit Tests",
pollInterval: 5000,
statusCheckAttempts: 60,
maxRetries: 1,
browsers: [{
browserName: "firefox",
platform: "linux"
Expand All @@ -212,9 +213,7 @@ module.exports = function(grunt) {
version: "8.0",
deviceName: "iPad Simulator",
deviceOrientation: "portrait"
}],
build: process.env.TRAVIS_JOB_ID,
"tunnel-identifier": process.env.TRAVIS_JOB_NUMBER
}]
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "plottable",
"description": "A modular charting library built on D3",
"version": "1.16.1",
"version": "1.16.2",
"main": ["plottable.js", "plottable.css"],
"typescript": {
"definition": "plottable.d.ts"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "plottable.js",
"description": "A modular charting library built on D3",
"version": "1.16.1",
"version": "1.16.2",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
264 changes: 131 additions & 133 deletions plottable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4676,139 +4676,137 @@ declare module Plottable.Interactions {
offPointerExit(callback: PointerCallback): Pointer;
}
}
declare module Plottable {
module Interactions {
class PanZoom extends Interaction {
/**
* The number of pixels occupied in a line.
*/
private static _PIXELS_PER_LINE;
private _xScales;
private _yScales;
private _dragInteraction;
private _mouseDispatcher;
private _touchDispatcher;
private _touchIds;
private _wheelCallback;
private _touchStartCallback;
private _touchMoveCallback;
private _touchEndCallback;
private _touchCancelCallback;
private _minDomainExtents;
private _maxDomainExtents;
/**
* A PanZoom Interaction updates the domains of an x-scale and/or a y-scale
* in response to the user panning or zooming.
*
* @constructor
* @param {QuantitativeScale} [xScale] The x-scale to update on panning/zooming.
* @param {QuantitativeScale} [yScale] The y-scale to update on panning/zooming.
*/
constructor(xScale?: QuantitativeScale<any>, yScale?: QuantitativeScale<any>);
protected _anchor(component: Component): void;
protected _unanchor(): void;
private _handleTouchStart(ids, idToPoint, e);
private _handlePinch(ids, idToPoint, e);
private static _centerPoint(point1, point2);
private static _pointDistance(point1, point2);
private _handleTouchEnd(ids, idToPoint, e);
private _magnifyScale<D>(scale, magnifyAmount, centerValue);
private _translateScale<D>(scale, translateAmount);
private _handleWheelEvent(p, e);
private _constrainedZoomAmount(scale, zoomAmount);
private _setupDragInteraction();
private _nonLinearScaleWithExtents(scale);
/**
* Gets the x scales for this PanZoom Interaction.
*/
xScales(): QuantitativeScale<any>[];
/**
* Sets the x scales for this PanZoom Interaction.
*
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
xScales(xScales: QuantitativeScale<any>[]): Interactions.PanZoom;
/**
* Gets the y scales for this PanZoom Interaction.
*/
yScales(): QuantitativeScale<any>[];
/**
* Sets the y scales for this PanZoom Interaction.
*
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
yScales(yScales: QuantitativeScale<any>[]): Interactions.PanZoom;
/**
* Adds an x scale to this PanZoom Interaction
*
* @param {QuantitativeScale<any>} An x scale to add
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
addXScale(xScale: QuantitativeScale<any>): PanZoom;
/**
* Removes an x scale from this PanZoom Interaction
*
* @param {QuantitativeScale<any>} An x scale to remove
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
removeXScale(xScale: QuantitativeScale<any>): PanZoom;
/**
* Adds a y scale to this PanZoom Interaction
*
* @param {QuantitativeScale<any>} A y scale to add
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
addYScale(yScale: QuantitativeScale<any>): PanZoom;
/**
* Removes a y scale from this PanZoom Interaction
*
* @param {QuantitativeScale<any>} A y scale to remove
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
removeYScale(yScale: QuantitativeScale<any>): PanZoom;
/**
* Gets the minimum domain extent for the scale, specifying the minimum allowable amount
* between the ends of the domain.
*
* Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale
*
* @param {QuantitativeScale<any>} quantitativeScale The scale to query
* @returns {D} The minimum domain extent for the scale.
*/
minDomainExtent<D>(quantitativeScale: QuantitativeScale<D>): D;
/**
* Sets the minimum domain extent for the scale, specifying the minimum allowable amount
* between the ends of the domain.
*
* Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale
*
* @param {QuantitativeScale<any>} quantitativeScale The scale to query
* @param {D} minDomainExtent The minimum domain extent for the scale.
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
minDomainExtent<D>(quantitativeScale: QuantitativeScale<D>, minDomainExtent: D): Interactions.PanZoom;
/**
* Gets the maximum domain extent for the scale, specifying the maximum allowable amount
* between the ends of the domain.
*
* Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale
*
* @param {QuantitativeScale<any>} quantitativeScale The scale to query
* @returns {D} The maximum domain extent for the scale.
*/
maxDomainExtent<D>(quantitativeScale: QuantitativeScale<D>): D;
/**
* Sets the maximum domain extent for the scale, specifying the maximum allowable amount
* between the ends of the domain.
*
* Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale
*
* @param {QuantitativeScale<any>} quantitativeScale The scale to query
* @param {D} minDomainExtent The maximum domain extent for the scale.
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
maxDomainExtent<D>(quantitativeScale: QuantitativeScale<D>, maxDomainExtent: D): Interactions.PanZoom;
}
declare module Plottable.Interactions {
class PanZoom extends Interaction {
/**
* The number of pixels occupied in a line.
*/
private static _PIXELS_PER_LINE;
private _xScales;
private _yScales;
private _dragInteraction;
private _mouseDispatcher;
private _touchDispatcher;
private _touchIds;
private _wheelCallback;
private _touchStartCallback;
private _touchMoveCallback;
private _touchEndCallback;
private _touchCancelCallback;
private _minDomainExtents;
private _maxDomainExtents;
/**
* A PanZoom Interaction updates the domains of an x-scale and/or a y-scale
* in response to the user panning or zooming.
*
* @constructor
* @param {QuantitativeScale} [xScale] The x-scale to update on panning/zooming.
* @param {QuantitativeScale} [yScale] The y-scale to update on panning/zooming.
*/
constructor(xScale?: QuantitativeScale<any>, yScale?: QuantitativeScale<any>);
protected _anchor(component: Component): void;
protected _unanchor(): void;
private _handleTouchStart(ids, idToPoint, e);
private _handlePinch(ids, idToPoint, e);
private static _centerPoint(point1, point2);
private static _pointDistance(point1, point2);
private _handleTouchEnd(ids, idToPoint, e);
private _magnifyScale<D>(scale, magnifyAmount, centerValue);
private _translateScale<D>(scale, translateAmount);
private _handleWheelEvent(p, e);
private _constrainedZoomAmount(scale, zoomAmount);
private _setupDragInteraction();
private _nonLinearScaleWithExtents(scale);
/**
* Gets the x scales for this PanZoom Interaction.
*/
xScales(): QuantitativeScale<any>[];
/**
* Sets the x scales for this PanZoom Interaction.
*
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
xScales(xScales: QuantitativeScale<any>[]): Interactions.PanZoom;
/**
* Gets the y scales for this PanZoom Interaction.
*/
yScales(): QuantitativeScale<any>[];
/**
* Sets the y scales for this PanZoom Interaction.
*
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
yScales(yScales: QuantitativeScale<any>[]): Interactions.PanZoom;
/**
* Adds an x scale to this PanZoom Interaction
*
* @param {QuantitativeScale<any>} An x scale to add
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
addXScale(xScale: QuantitativeScale<any>): PanZoom;
/**
* Removes an x scale from this PanZoom Interaction
*
* @param {QuantitativeScale<any>} An x scale to remove
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
removeXScale(xScale: QuantitativeScale<any>): PanZoom;
/**
* Adds a y scale to this PanZoom Interaction
*
* @param {QuantitativeScale<any>} A y scale to add
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
addYScale(yScale: QuantitativeScale<any>): PanZoom;
/**
* Removes a y scale from this PanZoom Interaction
*
* @param {QuantitativeScale<any>} A y scale to remove
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
removeYScale(yScale: QuantitativeScale<any>): PanZoom;
/**
* Gets the minimum domain extent for the scale, specifying the minimum allowable amount
* between the ends of the domain.
*
* Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale
*
* @param {QuantitativeScale<any>} quantitativeScale The scale to query
* @returns {D} The minimum domain extent for the scale.
*/
minDomainExtent<D>(quantitativeScale: QuantitativeScale<D>): D;
/**
* Sets the minimum domain extent for the scale, specifying the minimum allowable amount
* between the ends of the domain.
*
* Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale
*
* @param {QuantitativeScale<any>} quantitativeScale The scale to query
* @param {D} minDomainExtent The minimum domain extent for the scale.
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
minDomainExtent<D>(quantitativeScale: QuantitativeScale<D>, minDomainExtent: D): Interactions.PanZoom;
/**
* Gets the maximum domain extent for the scale, specifying the maximum allowable amount
* between the ends of the domain.
*
* Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale
*
* @param {QuantitativeScale<any>} quantitativeScale The scale to query
* @returns {D} The maximum domain extent for the scale.
*/
maxDomainExtent<D>(quantitativeScale: QuantitativeScale<D>): D;
/**
* Sets the maximum domain extent for the scale, specifying the maximum allowable amount
* between the ends of the domain.
*
* Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale
*
* @param {QuantitativeScale<any>} quantitativeScale The scale to query
* @param {D} minDomainExtent The maximum domain extent for the scale.
* @returns {Interactions.PanZoom} The calling PanZoom Interaction.
*/
maxDomainExtent<D>(quantitativeScale: QuantitativeScale<D>, maxDomainExtent: D): Interactions.PanZoom;
}
}
declare module Plottable {
Expand Down
7 changes: 5 additions & 2 deletions plottable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
Plottable 1.16.1 (https://github.com/palantir/plottable)
Plottable 1.16.2 (https://github.com/palantir/plottable)
Copyright 2014-2015 Palantir Technologies
Licensed under MIT (https://github.com/palantir/plottable/blob/master/LICENSE)
*/
Expand Down Expand Up @@ -885,7 +885,7 @@ var Plottable;
})(Plottable || (Plottable = {}));
var Plottable;
(function (Plottable) {
Plottable.version = "1.16.1";
Plottable.version = "1.16.2";
})(Plottable || (Plottable = {}));
var Plottable;
(function (Plottable) {
Expand Down Expand Up @@ -6968,6 +6968,9 @@ var Plottable;
closestPointEntity = entity;
}
});
if (closestPointEntity === undefined) {
return undefined;
}
return this._lightweightPlotEntityToPlotEntity(closestPointEntity);
};
/**
Expand Down
4 changes: 2 additions & 2 deletions plottable.min.js

Large diffs are not rendered by default.

Binary file modified plottable.zip
Binary file not shown.
4 changes: 1 addition & 3 deletions src/interactions/panZoomInteraction.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module Plottable {
export module Interactions {
module Plottable.Interactions {
export class PanZoom extends Interaction {
/**
* The number of pixels occupied in a line.
Expand Down Expand Up @@ -427,4 +426,3 @@ export module Interactions {
}
}
}
}
3 changes: 3 additions & 0 deletions src/plots/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,9 @@ export class Plot extends Component {
closestPointEntity = entity;
}
});
if (closestPointEntity === undefined) {
return undefined;
}

return this._lightweightPlotEntityToPlotEntity(closestPointEntity);
}
Expand Down
Loading

0 comments on commit 407b10e

Please sign in to comment.