Skip to content

Commit 891a32b

Browse files
committed
Fix axis null selection bug
1 parent bde4dac commit 891a32b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vueplotlib",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"private": false,
55
"scripts": {
66
"serve": "vue-cli-service serve --open ./examples-src/index.js",

src/components/axes/Axis.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,16 @@ export default {
365365
.tickSizeOuter(tickSizeOuter)
366366
.tickFormat(tickFormatFunction2)
367367
);
368-
const textBboxZoomedIn = ticksZoomedIn.select("text").node().getBBox();
368+
369+
370+
let textBboxZoomedIn;
371+
try {
372+
textBboxZoomedIn = ticksZoomedIn.select("text").node().getBBox();
373+
} catch(e) {
374+
// Replace with dummy object on failure
375+
// TODO: find better solution
376+
textBboxZoomedIn = { height: 0 };
377+
}
369378
370379
const tickTransformFunction = (d, i, v) => {
371380
let tickBbox = v[i].getBBox();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy