Skip to content

Commit

Permalink
Merge e3a1c2a into 9ad47fd
Browse files Browse the repository at this point in the history
  • Loading branch information
netil committed Mar 13, 2024
2 parents 9ad47fd + e3a1c2a commit 453742e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions src/ChartInternal/internals/clip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Copyright (c) 2017 ~ present NAVER Corp.
* billboard.js project is licensed under the MIT license
*/
import {document, window} from "../../module/browser";

export default {
initClip(): void {
Expand Down Expand Up @@ -33,11 +32,7 @@ export default {
return null;
}

const isIE9 = window.navigator ?
window.navigator.appVersion
.toLowerCase().indexOf("msie 9.") >= 0 : false;

return `url(${(isIE9 ? "" : document.URL.split("#")[0])}#${id})`;
return `url(#${id})`;
},

appendClip(parent, id: string): void {
Expand Down
4 changes: 2 additions & 2 deletions test/internals/core-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ describe("CORE", function() {
});

it("chart should have clip-path property", () => {
const main = chart.$.main.select(`.${$COMMON.chart}`);
const clipPath = chart.$.main.select(`.${$COMMON.chart}`)?.attr("clip-path");

expect(main.attr("clip-path")).to.not.be.null;
expect(/url\(#bb-\d+-clip\)/.test(clipPath)).to.be.true;
});

it("set option: axis.y2.show=true", () => {
Expand Down

0 comments on commit 453742e

Please sign in to comment.