Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix portal offset issue #1302

Merged
merged 2 commits into from
May 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default class VictoryContainer extends React.Component {
responsive
} = props;
const children = this.getChildren(props);
const dimensions = responsive ? { width: "100%", height: "100%" } : { width, height };
const dimensions = responsive ? { width: "100%", height: "auto" } : { width, height };
const divStyle = assign(
{ pointerEvents: "none", touchAction: "none", position: "relative" },
dimensions
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-area/victory-area.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("components/victory-area", () => {
const wrapper = mount(<VictoryArea />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewbox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-axis/victory-axis.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("components/victory-axis", () => {
const wrapper = mount(<VictoryAxis />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-bar/victory-bar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("components/victory-bar", () => {
const wrapper = mount(<VictoryBar />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-box-plot/victory-box-plot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe("components/victory-box-plot", () => {
const wrapper = mount(<VictoryBoxPlot data={dataset} />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("components/victory-candlestick", () => {
const wrapper = mount(<VictoryCandlestick data={dataSet} />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-chart/victory-chart.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("components/victory-chart", () => {
const wrapper = mount(<VictoryChart />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("components/victory-errorbar", () => {
const wrapper = mount(<VictoryErrorBar />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-group/victory-group.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("components/victory-group", () => {
);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-line/victory-line.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("components/victory-line", () => {
const wrapper = mount(<VictoryLine />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-pie/victory-pie.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("components/victory-pie", () => {
const wrapper = mount(<VictoryPie />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-scatter/victory-scatter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("components/victory-scatter", () => {
const wrapper = mount(<VictoryScatter />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-stack/victory-stack.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("components/victory-stack", () => {
);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewBox", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/client/spec/victory-voronoi/victory-voronoi.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("components/victory-voronoi", () => {
const wrapper = mount(<VictoryVoronoi />);
const svg = wrapper.find("svg").at(0);
expect(svg.prop("style").width).to.equal("100%");
expect(svg.prop("style").height).to.equal("100%");
expect(svg.prop("style").height).to.equal("auto");
});

it("renders an svg with the correct viewbox", () => {
Expand Down