Skip to content

Commit

Permalink
Merge pull request #874 from palantir/release-0.25.1
Browse files Browse the repository at this point in the history
Release 0.25.1
  • Loading branch information
jtlan committed Aug 22, 2014
2 parents f4b8c76 + b8b7aad commit 66d0e70
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ module.exports = function(grunt) {
version: "35"
}, {
browserName: "internet explorer",
version: "10",
platform: "WIN8"
version: "9",
platform: "WIN7"
}];

var configJSON = {
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 library for creating charts out of D3",
"version": "0.25.0",
"version": "0.25.1",
"main": ["plottable.js", "plottable.css"],
"license": "MIT",
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plottable.js",
"version": "0.25.0",
"version": "0.25.1",
"description": "Build flexible, performant, interactive charts using D3",
"repository": {
"type": "git",
Expand Down
9 changes: 6 additions & 3 deletions plottable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
Plottable 0.25.0 (https://github.com/palantir/plottable)
Plottable 0.25.1 (https://github.com/palantir/plottable)
Copyright 2014 Palantir Technologies
Licensed under MIT (https://github.com/palantir/plottable/blob/master/LICENSE)
*/
Expand Down Expand Up @@ -1364,7 +1364,7 @@ var Plottable;
///<reference path="../reference.ts" />
var Plottable;
(function (Plottable) {
Plottable.version = "0.25.0";
Plottable.version = "0.25.1";
})(Plottable || (Plottable = {}));

///<reference path="../reference.ts" />
Expand Down Expand Up @@ -1926,7 +1926,10 @@ var Plottable;

Component.prototype.generateClipPath = function () {
// The clip path will prevent content from overflowing its component space.
this.element.attr("clip-path", "url(#clipPath" + this._plottableID + ")");
// HACKHACK: IE <=9 does not respect the HTML base element in SVG.
// They don't need the current URL in the clip path reference.
var prefix = /MSIE [5-9]/.test(navigator.userAgent) ? "" : document.location.href;
this.element.attr("clip-path", "url(" + prefix + "#clipPath" + this._plottableID + ")");
var clipPathParent = this.boxContainer.append("clipPath").attr("id", "clipPath" + this._plottableID);
this.addBox("clip-rect", clipPathParent);
};
Expand Down
8 changes: 4 additions & 4 deletions plottable.min.js

Large diffs are not rendered by default.

Binary file modified plottable.zip
Binary file not shown.
5 changes: 4 additions & 1 deletion src/core/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,10 @@ export module Abstract {

private generateClipPath() {
// The clip path will prevent content from overflowing its component space.
this.element.attr("clip-path", "url(#clipPath" + this._plottableID + ")");
// HACKHACK: IE <=9 does not respect the HTML base element in SVG.
// They don't need the current URL in the clip path reference.
var prefix = /MSIE [5-9]/.test(navigator.userAgent) ? "" : document.location.href;
this.element.attr("clip-path", "url(" + prefix + "#clipPath" + this._plottableID + ")");
var clipPathParent = this.boxContainer.append("clipPath")
.attr("id", "clipPath" + this._plottableID);
this.addBox("clip-rect", clipPathParent);
Expand Down
3 changes: 2 additions & 1 deletion test/core/componentTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ it("components can be offset relative to their alignment, and throw errors if th
c._anchor(svg);
c._computeLayout(0, 0, 100, 100);
c._render();
var expectedClipPathURL = "url(#clipPath" + expectedClipPathID+ ")";
var expectedPrefix = /MSIE [5-9]/.test(navigator.userAgent) ? "" : document.location.href;
var expectedClipPathURL = "url(" + expectedPrefix + "#clipPath" + expectedClipPathID+ ")";
// IE 9 has clipPath like 'url("#clipPath")', must accomodate
var normalizeClipPath = (s: string) => s.replace(/"/g, "");
assert.isTrue(normalizeClipPath(c.element.attr("clip-path")) === expectedClipPathURL,
Expand Down
3 changes: 2 additions & 1 deletion test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2739,7 +2739,8 @@ describe("Component behavior", function () {
c._anchor(svg);
c._computeLayout(0, 0, 100, 100);
c._render();
var expectedClipPathURL = "url(#clipPath" + expectedClipPathID + ")";
var expectedPrefix = /MSIE [5-9]/.test(navigator.userAgent) ? "" : document.location.href;
var expectedClipPathURL = "url(" + expectedPrefix + "#clipPath" + expectedClipPathID + ")";
var normalizeClipPath = function (s) { return s.replace(/"/g, ""); };
assert.isTrue(normalizeClipPath(c.element.attr("clip-path")) === expectedClipPathURL, "the element has clip-path url attached");
var clipRect = c.boxContainer.select(".clip-rect");
Expand Down

0 comments on commit 66d0e70

Please sign in to comment.