Skip to content

Commit 838fbfc

Browse files
committed
Fix showing axes context menu in 3D painter
1 parent 55b7a5e commit 838fbfc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

scripts/JSRootPainter.hist3d.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,14 @@
214214
if (intersects)
215215
for (var n=0;n<intersects.length;++n) {
216216
var mesh = intersects[n].object;
217-
if (mesh.zoom) { kind = mesh.zoom; break; }
217+
if (mesh.zoom) { kind = mesh.zoom; p = obj_painter.frame_painter(); break; }
218218
if (mesh.painter && typeof mesh.painter.ShowContextMenu === 'function') {
219219
p = mesh.painter; break;
220220
}
221221
}
222222

223-
p.ShowContextMenu(kind, pos);
223+
if (typeof p.ShowContextMenu == 'function')
224+
p.ShowContextMenu(kind, pos);
224225
}
225226
}
226227

scripts/JSRootPainter.v7hist3d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
if (intersects)
195195
for (var n=0;n<intersects.length;++n) {
196196
var mesh = intersects[n].object;
197-
if (mesh.zoom) { kind = mesh.zoom; break; }
197+
if (mesh.zoom) { kind = mesh.zoom; p = obj_painter.frame_painter(); break; }
198198
if (mesh.painter && typeof mesh.painter.ShowContextMenu === 'function') {
199199
p = mesh.painter; break;
200200
}

0 commit comments

Comments
 (0)