Skip to content

Commit 0db8a77

Browse files
committed
Fix - do not create BrowserLayout for offline canvas
It is happens when TWebCanvas JSON drawn in jupyter lab. Extra tools like GED is not working, therefore no need to create browser layout for it
1 parent 490f5fd commit 0db8a77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/gpad/RPadPainter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ class RPadPainter extends RObjectPainter {
11831183

11841184
const mainid = this.selectDom().attr('id');
11851185

1186-
if (!this.isBatchMode() && !this.use_openui && !this.brlayout && mainid && isStr(mainid) && !getHPainter()) {
1186+
if (!this.isBatchMode() && this.online_canvas && !this.use_openui && !this.brlayout && mainid && isStr(mainid) && !getHPainter()) {
11871187
this.brlayout = new BrowserLayout(mainid, null, this);
11881188
this.brlayout.create(mainid, true);
11891189
this.setDom(this.brlayout.drawing_divid()); // need to create canvas

modules/gpad/TPadPainter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ class TPadPainter extends ObjectPainter {
18791879

18801880
const mainid = this.selectDom().attr('id');
18811881

1882-
if (!this.isBatchMode() && !this.use_openui && !this.brlayout && mainid && isStr(mainid) && !getHPainter()) {
1882+
if (!this.isBatchMode() && this.online_canvas && !this.use_openui && !this.brlayout && mainid && isStr(mainid) && !getHPainter()) {
18831883
this.brlayout = new BrowserLayout(mainid, null, this);
18841884
this.brlayout.create(mainid, true);
18851885
this.setDom(this.brlayout.drawing_divid()); // need to create canvas

0 commit comments

Comments
 (0)