Skip to content

Commit 13930c2

Browse files
committed
Fix - no extra layout for webcanvas json drawn from hpainter
1 parent 2db5654 commit 13930c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: modules/gpad/RPadPainter.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { RObjectPainter } from '../base/RObjectPainter.mjs';
55
import { prSVG, getElementRect, getAbsPosInCanvas, DrawOptions, compressSVG, makeTranslate, svgToImage } from '../base/BasePainter.mjs';
66
import { selectActivePad, getActivePad } from '../base/ObjectPainter.mjs';
77
import { registerForResize, saveFile } from '../gui/utils.mjs';
8-
import { BrowserLayout } from '../gui/display.mjs';
8+
import { BrowserLayout, getHPainter } from '../gui/display.mjs';
99
import { createMenu, closeMenu } from '../gui/menu.mjs';
1010
import { PadButtonsHandler } from './TPadPainter.mjs';
1111

@@ -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)) {
1186+
if (!this.isBatchMode() && !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

Diff for: modules/gpad/TPadPainter.mjs

+1-1
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)) {
1882+
if (!this.isBatchMode() && !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)